unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: 'Stefan Monnier' <monnier@IRO.UMontreal.CA>, 6280@debbugs.gnu.org
Subject: bug#6280: 24.0.50; (elisp) Dedicated Windows
Date: Fri, 28 May 2010 17:10:13 +0200	[thread overview]
Message-ID: <4BFFDCD5.90706@gmx.at> (raw)
In-Reply-To: <804C0F1267E447EE983B0C90E01F1573@us.oracle.com>

 > So I guess you are trying to point out a conflict that can arise: in _some_
 > cases an application might override a user's directive to make some window
 > dedicated. Is that your point?

No, and I even don't have a point here.  I just wanted to explain how
ECB handles what might be the OP's dilemma.

 > If so:
 >
[...]
 > And that simple user task needs to be better documented.

I doubt that this is a simple user task ...

 >  The important point - the point of the bug, is that a
 > fairly common user task is not adequately documented.

... or a fairly common one.

 >> Suppose you are in a help buffer and want to follow a cross
 >> reference to an Elisp source code buffer.  IIRC this usually
 >> calls `pop-to-buffer'. Now should this action allow `display-buffer'
 >> to "steal" a window showing another Elisp buffer?
 >
 > Not sure how that is relevant. Perhaps you are repeating your point above.

No.  I tried to give a simple example demonstrating that handling
dedicated windows is not simple.

 > Unlike you, I am not trying to redesign Emacs in a bug thread. This bug is about
 > better documenting for users the _existing_ feature that you _can_ dedicate a
 > window to a buffer. That's not sufficiently clear in the doc.

Dedicated windows have an entire section in the Elisp manual.  What is
not sufficiently clear there?

 > Please do not confuse your personal interests and knowledge about this topic
 > with those of a newbie user. This is not about you or how to best design the
 > complex interaction of various possibly conflicting directives to Emacs to
 > display buffers in windows. This is about conveying the simple knowledge that
 > most non-newbies have about dedicated windows to newbies.

We have to disagree on one simple fact: You consider dedicating windows
to buffers a simple task that requires only simple knowledge.  I don't.

 > Does it not do what the OP requested, when you try it? Does it not dedicate the
 > windows for buffers that are in `emacs-lisp-mode'? Do you "_completely_ fail to
 > understand" that it does what the OP asked?

Suppose I have a window showing a buffer in `emacs-lisp-mode' and I
split that window.  Then the new window obviosuly should be dedicated to
that buffer as well.  I fail to understand how you achieve that.

 >> Also, making `special-display-regexps' buffer-local doesn't
 >> make sense to me.  At the time `display-buffer' is called
 >> _any_ buffer may be current.
 >
 > So what? Provided that the function that makes the variable local is called when
 > the correct buffer is current, the variable is made buffer-local in the buffer
 > in question, i.e. in a buffer in the OP's mode.
 >
 > Whether that is the right function to use and the hook is run at the proper time
 > is another question. I think it is, but even if I'm mistaken about that, the
 > point is that you _can_ make `special-display-regexps' local for a buffer that's
 > in the mode you want, and doing that will make buffers in that mode display in
 > dedicated windows.

The fact that you can make a variable buffer-local doesn't imply that it
makes sense to do so.  Making `special-display-regexps' buffer-local
doesn't make sense, IMHO.

 > I do not claim that the function I gave is the right one to document. The point
 > is that we should document this simple user task - tell users that they _can_ do
 > it and, if simple, show them _how_ to do it.
[...]
 > Fine. But please keep in mind the aim of the bug report and, more importantly,
 > the OP's aim. He wants to have the buffers in mode X use dedicated windows.

I earlier mentioned how you can do what the OP wants.  Write a function
that you _globally_ add to `window-configuration-change-hook'.  That
function would have to scan `window-list', check for each window whether
its buffer is in a mode that shall have dedicated windows, and, if that
is the case, call `set-window-dedicated-p' for that window with some
non-nil, non-t flag.  If someone can come up with a simpler solution
I'll be all ears.

martin





  reply	other threads:[~2010-05-28 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 15:51 bug#6280: 24.0.50; (elisp) Dedicated Windows Drew Adams
2010-05-27 17:24 ` martin rudalics
2010-05-27 17:51   ` Drew Adams
2010-05-28  9:19     ` martin rudalics
2010-05-28 14:13       ` Drew Adams
2010-05-28 15:10         ` martin rudalics [this message]
2010-05-28 16:16           ` Drew Adams
2010-05-29  8:20             ` martin rudalics
2014-02-10  3:19           ` Lars Ingebrigtsen
2014-02-10  3:32             ` Drew Adams
2014-02-10  8:15               ` martin rudalics
2014-02-10 16:52                 ` Stefan Monnier
2014-02-10 17:02                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BFFDCD5.90706@gmx.at \
    --to=rudalics@gmx.at \
    --cc=6280@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).