unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: `pop-up-frames' and binding/setting user options [was: Documenting buffer display]
Date: Mon, 22 Oct 2018 21:15:09 +0200	[thread overview]
Message-ID: <5BCE21BD.80008@gmx.at> (raw)
In-Reply-To: <3c7bc9d6-2841-4f67-96ef-511af5237475@default>

 > Not to mention that you cannot "always pass an argument"
 > instead.

The canonical way for a program to affect the behavior of
'display-buffer' is to pass an argument.  Everything else is
discouraged.  'display-buffer-overriding-action' is the only
construct to override the user and should be used with care.

 > Not without recoding the world, at least.  See
 > RMS's article for good, simple examples.
 >
 > Emacs Lisp is for Emacs - an interactive program.  Sure,
 > all of the advantages of lexical scoping are nice, but
 > performance, for example, is in many instances not as
 > important for Emacs as for other programming contexts.
 > Optimization is, for Emacs, a nice-to-have, in general.
 >
 > Likewise, the better ability to reason about program
 > behavior that lexical scoping brings.  Likewise, the
 > reduced funarg problems.
 >
 > But (1) we have lexical scoping now (and I, for one,
 > am in favor of it being on by default, as in Common
 > Lisp), and (2) if we really want solid semantic
 > behavior (no funarg problems at all) then we should
 > move to a purely functional, fully lazy language.
 > I don't see #2 happening, and it need not.  Emacs
 > Lisp is a good language for Emacs.

What do all these have to do with the subject at hand?

 >> Unless it's a specific bookmark the user wants to handle specifically.
 >
 > Maybe you meant "buffer" instead of "bookmark".

I meant bookmark - a position in a buffer stored for later perusal.
Why else would we be discussing 'display-buffer' in this context?

 > (I often make that typo, in both directions.)
 >
 > But maybe you did mean bookmark.  And the bookmark
 > code gives you the possibility of treating specific
 > bookmarks differently.  And this code is for a
 > _command_ whose job is specifically to pop to the
 > bookmark in another frame.  If you don't want that
 > behavior for a particular bookmark then you won't
 > use that command - you'll use a different command.

This command would be for usually popping up the bookmark in another
frame and the user would know that.  However, for certain, specified
bookmarks the user might want to use the selected frame instead and
still use the same command.  If this command forces the use of the
selected frame by binding some global variable instead of passing an
appropriate action argument, it inhibits the user to customize its
behavior.  Just like calling 'switch-to-buffer' inhibits the user to
pop to a buffer in another window or frame.

 > So there are multiple ways around your problem.
 > Two of them are: (1) specify specific behavior for
 > a specific bookmark and (2) use a different command.
 >
 > If you do want specific _buffers_ to be handled
 > specially then you can of course have recourse to
 > the general toolkit that is `display-buffer-alist'.
 > No problem.

Unless the application overrides it.

martin



  reply	other threads:[~2018-10-22 19:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 16:10 `pop-up-frames' and binding/setting user options [was: Documenting buffer display] Drew Adams
2018-10-21 17:01 ` Eli Zaretskii
2018-10-22  9:06 ` martin rudalics
2018-10-22 14:16   ` Drew Adams
2018-10-22 19:15     ` martin rudalics [this message]
2018-10-22 20:42       ` Drew Adams
2018-10-23  8:58         ` martin rudalics
2018-10-23 14:13           ` Drew Adams
2018-10-23 17:35             ` Stefan Monnier
2018-10-23 18:01               ` Drew Adams
2018-10-23 18:20                 ` Stefan Monnier
2018-10-23 18:28                   ` Stefan Monnier
2018-10-23 23:05                     ` Drew Adams
2018-10-23 22:57                   ` Drew Adams
2018-10-23 18:19             ` martin rudalics

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=5BCE21BD.80008@gmx.at \
    --to=rudalics@gmx.at \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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).