emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* pop-up-windows
@ 2009-04-25  3:44 Samuel Wales
  2009-05-06 12:14 ` pop-up-windows Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2009-04-25  3:44 UTC (permalink / raw)
  To: emacs-orgmode

When I click on a link, org-open-at-point splits the window.
What I would like is for it to open the link in the current
window.  The same occurs with org-remember; it splits the
window, but I would like to have the whole window.

Both Emacs and Xemacs have a standard variable,
pop-up-windows, that allows the user to control this
behavior.  Users who set it to nil can expect all but the
most unusual buffers to open in the current window.  Most
parts of emacs respect it.

IMO it would be useful for org to do the same.  It is easy to do,
because you can call pop-to-buffer instead of
switch-to-buffer-other-window.

Try these:

(let ((pop-up-windows t)) (pop-to-buffer (get-buffer "*Messages*")))
(let ((pop-up-windows)) (pop-to-buffer (get-buffer "*Messages*")))

People who use small screens and people who use large fonts
use nil because splitting the window makes small windows.

In org, todo state selection and tag selection should
probably ignore the variable, provided that the window
height contains the buffer.  The context is useful, so it's
OK to split the window.

Export dispatch and agenda dispatch should probably respect
the variable because context usually does not add to the
decision being made (among other reasons).  They do not
currently respect it.

org-complete is currently problematic because it
inadvertently respects the variable.  It changes to the
completions buffer, and then the completion keys do not
work.  This should probably either ignore the variable or accept the
completion keys.  However, I do not use it, so I have not
tried it much.

I hope this made enough sense to be useful to you.  :)

Thanks.

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Greed is corrupting science into foul nonsense.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: pop-up-windows
  2009-04-25  3:44 pop-up-windows Samuel Wales
@ 2009-05-06 12:14 ` Carsten Dominik
  2009-05-28 22:49   ` pop-up-windows Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-05-06 12:14 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode


Hi Samuel,

On Apr 25, 2009, at 5:44 AM, Samuel Wales wrote:

> When I click on a link, org-open-at-point splits the window.
> What I would like is for it to open the link in the current
> window.  The same occurs with org-remember; it splits the
> window, but I would like to have the whole window.
>
> Both Emacs and Xemacs have a standard variable,
> pop-up-windows, that allows the user to control this
> behavior.  Users who set it to nil can expect all but the
> most unusual buffers to open in the current window.  Most
> parts of emacs respect it.

I do not use display-buffer in Org, because the results are
so unpredictable for different users precisely because there
is a plethora of options and hooks that do modify the behavior.
This makes it difficult to create a consistent interface, at
least in my opinion.

As mentioned in this thread, use org-link-frame-setup to
customize this for links.

For remember you can use

(add-hook 'remember-mode-hook 'delete-other-windows)


>
> IMO it would be useful for org to do the same.  It is easy to do,
> because you can call pop-to-buffer instead of
> switch-to-buffer-other-window.
>
> Try these:
>
> (let ((pop-up-windows t)) (pop-to-buffer (get-buffer "*Messages*")))
> (let ((pop-up-windows)) (pop-to-buffer (get-buffer "*Messages*")))
>
> People who use small screens and people who use large fonts
> use nil because splitting the window makes small windows.


>
> In org, todo state selection and tag selection should
> probably ignore the variable, provided that the window
> height contains the buffer.  The context is useful, so it's
> OK to split the window.

Exactly, this is what drove me crazy and toward
abandoning pop-to-buffer and display-buffer entirely.

> Export dispatch and agenda dispatch should probably respect
> the variable because context usually does not add to the
> decision being made (among other reasons).  They do not
> currently respect it.

I don't think this is an issue.  These commands make the
buffer as large as needed to display their entire content.
If necessary they will remove the other window.  So with a
large font, they can use the whole frame.

In general, I do like the other window to remain visible
if enough space is there, to remind the user of the calling
context.

> org-complete is currently problematic because it
> inadvertently respects the variable.  It changes to the
> completions buffer, and then the completion keys do not
> work.

I don't understand.  What is the problem?

> This should probably either ignore the variable or accept the
> completion keys.  However, I do not use it, so I have not
> tried it much.

- Carsten

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

* Re: pop-up-windows
  2009-05-06 12:14 ` pop-up-windows Carsten Dominik
@ 2009-05-28 22:49   ` Samuel Wales
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2009-05-28 22:49 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

On Wed, May 6, 2009 at 05:14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> I do not use display-buffer in Org, because the results are
> so unpredictable for different users precisely because there
> is a plethora of options and hooks that do modify the behavior.
> This makes it difficult to create a consistent interface, at
> least in my opinion.

I think this might be a question of whether you want a consistent
interface for org across all users (e.g. for helping people debug
issues) vs. a consistent interface across all of emacs for a single
user.  Respecting pop-up-windows IMO achieves the latter (although as
you poiint out, you can set variables and hooks in org for the most
important cases).

I did check coding standards; I expected the variable to be mentioned,
but it isn't, so it's merely an informal standard.  But I am sometimes
having to fix the behavior of parts of emacs that don't respect
pop-up-windows, including, strangely (and non-fixably) help mode
source butttons.

>> Export dispatch and agenda dispatch should probably respect
>> the variable because context usually does not add to the
>> decision being made (among other reasons).  They do not
>> currently respect it.
>
> I don't think this is an issue.  These commands make the
> buffer as large as needed to display their entire content.
> If necessary they will remove the other window.  So with a
> large font, they can use the whole frame.

True.  Respecting pop-up-windows here is merely to avoid surprises for
those who use it consistently.

>> org-complete is currently problematic because it
>> inadvertently respects the variable.  It changes to the
>> completions buffer, and then the completion keys do not
>> work.
>
> I don't understand.  What is the problem?

Try setting pop-up-windows to nil, and completing.  You will find that
you get a completions buffer.  Normally in completion, you can add
another key and complete again.  But in the completions buffer you
cannot.  This is a case where splitting the windows regardless of
pop-up-windows would be useful.  That or allowing the completions
buffer to be active.

>> This should probably either ignore the variable or accept the
>> completion keys.  However, I do not use it, so I have not
>> tried it much.

Out of order:

>> In org, todo state selection and tag selection should
>> probably ignore the variable, provided that the window
>> height contains the buffer.  The context is useful, so it's
>> OK to split the window.
>
> Exactly, this is what drove me crazy and toward
> abandoning pop-to-buffer and display-buffer entirely.

Not sure why you need to abandon them entirely instead of just for these two?

Again, however, this is a minor consistency issue since you can use
variables and hooks to achieve the same result.  It is just for new
users to not have to find them.

Thanks.

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying science.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

end of thread, other threads:[~2009-05-28 22:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-25  3:44 pop-up-windows Samuel Wales
2009-05-06 12:14 ` pop-up-windows Carsten Dominik
2009-05-28 22:49   ` pop-up-windows Samuel Wales

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).