emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* id links and org-link-frame-setup
@ 2009-07-31  4:00 Samuel Wales
  2009-08-03  4:38 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2009-07-31  4:00 UTC (permalink / raw)
  To: emacs-orgmode

I almost always need a single window for everything except
completion.

In org, I have the following set to do this.

(pushnew '(file . find-file) org-link-frame-setup :test #'equal)
(add-hook 'remember-mode-hook 'delete-other-windows)
;;it might be nice to have a 'dedicated-buffer option
(setf org-indirect-buffer-display 'current-window)
;;could make pop kill the buffer
;;;(setf org-display-internal-link-with-indirect-buffer t)

But RET on an id link still opens another window.

Perhaps that, and all other types of links that open in Emacs, should
respect org-link-frame-setup?

Another possibility is for org to respect pop-up-windows, thus
allowing a single place to express this preference, but ATM I don't
remember from a previous thread whether (1) Carsten explicitly decided
not to do that, or (2) it had more to do with which function to use to
pop up windows.

Thanks.


P.S.  For others with the same need, here is my code for the
rest of Emacs.  The key variable is pop-up-windows, which
fixes it for most of Emacs.  There are still a few bugs, but
I have most of Emacs behaving now.

;;trying this, but does not work for dired and appt
;;(add-to-list 'same-window-regexps ".*")
(add-to-list 'same-window-regexps "\\*Customize.*") ;notwork?
(add-to-list 'same-window-regexps "\\*Man .*") ;notwork
;;;(add-to-list 'same-window-regexps ".*.org")
;;non-regexps
(add-to-list 'same-window-buffer-names "*Remember*")
(add-to-list 'same-window-buffer-names "*Help*")
(add-to-list 'same-window-buffer-names "*Apropos*")
(add-to-list 'same-window-buffer-names "*Summary*")
;;this fixes it but makes completions not work in lisp and shell.
(setf pop-up-windows nil)
;;(defvar alpha-same-window-buffer-names same-window-buffer-names)
;;(defadvice pop-to-buffer (around alpha-one-window first activate)

-- 
Myalgic encephalomyelitis makes you die decades early (Jason
et al. 2006) and suffer severely.  Conflicts of interest are
destroying research. What people "know" is wrong. Silence = death.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: id links and org-link-frame-setup
  2009-07-31  4:00 id links and org-link-frame-setup Samuel Wales
@ 2009-08-03  4:38 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-08-03  4:38 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode


On Jul 31, 2009, at 6:00 AM, Samuel Wales wrote:

> I almost always need a single window for everything except
> completion.
>
> In org, I have the following set to do this.
>
> (pushnew '(file . find-file) org-link-frame-setup :test #'equal)
> (add-hook 'remember-mode-hook 'delete-other-windows)
> ;;it might be nice to have a 'dedicated-buffer option
> (setf org-indirect-buffer-display 'current-window)
> ;;could make pop kill the buffer
> ;;;(setf org-display-internal-link-with-indirect-buffer t)
>
> But RET on an id link still opens another window.
>
> Perhaps that, and all other types of links that open in Emacs, should
> respect org-link-frame-setup?

I agree, and I have fixed that for id links.  Now sure how other link
types deal with this, but let me know if you stumble over another case.

- Carsten

>
> Another possibility is for org to respect pop-up-windows, thus
> allowing a single place to express this preference, but ATM I don't
> remember from a previous thread whether (1) Carsten explicitly decided
> not to do that, or (2) it had more to do with which function to use to
> pop up windows.
>
> Thanks.
>
>
> P.S.  For others with the same need, here is my code for the
> rest of Emacs.  The key variable is pop-up-windows, which
> fixes it for most of Emacs.  There are still a few bugs, but
> I have most of Emacs behaving now.
>
> ;;trying this, but does not work for dired and appt
> ;;(add-to-list 'same-window-regexps ".*")
> (add-to-list 'same-window-regexps "\\*Customize.*") ;notwork?
> (add-to-list 'same-window-regexps "\\*Man .*") ;notwork
> ;;;(add-to-list 'same-window-regexps ".*.org")
> ;;non-regexps
> (add-to-list 'same-window-buffer-names "*Remember*")
> (add-to-list 'same-window-buffer-names "*Help*")
> (add-to-list 'same-window-buffer-names "*Apropos*")
> (add-to-list 'same-window-buffer-names "*Summary*")
> ;;this fixes it but makes completions not work in lisp and shell.
> (setf pop-up-windows nil)
> ;;(defvar alpha-same-window-buffer-names same-window-buffer-names)
> ;;(defadvice pop-to-buffer (around alpha-one-window first activate)
>
> -- 
> Myalgic encephalomyelitis makes you die decades early (Jason
> et al. 2006) and suffer severely.  Conflicts of interest are
> destroying research. What people "know" is wrong. Silence = death.
> http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-03  4:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31  4:00 id links and org-link-frame-setup Samuel Wales
2009-08-03  4:38 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).