From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>, 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 13:42:59 -0700 (PDT) [thread overview]
Message-ID: <0f035e05-e04e-459c-b9a3-df1eb5542e65@default> (raw)
In-Reply-To: <5BCE21BD.80008@gmx.at>
> 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.
Why would someone choose to use an `other-frame'
command to get some behavior other than `other-frame'?
Especially since there are other bookmark jumping
commands that do not use another frame? The point
of the thread that this discussion responds to was
to add an other-frame bookmark jump command. We
already have other bookmark-jump commands for the
same window and for another window.
And it is trivial to define your own bookmark jump
command to do whatever you like that is special,
whether for a specific bookmark, specific jump
behavior, or whatever.
In particular, predefined command `bookmark-jump',
and some other jump commands, just invoke the
general function `bookmark--jump-via', which accepts
(surprise!) a DISPLAY-FUNCTION argument.
That's the _only_ difference between some of those
jump commands: the DISPLAY-FUNCTION argument passed.
But since `bookmark-jump' itself accepts an optional
DISPLAY-FUNCTION argument (which it just passes on
to `bookmark--jump-via'), you can just as well call
`bookmark-jump' instead of `bookmark--jump-via'.
And BTW, that's what `bookmark-jump-other-window' does.
And yes, if one prefers, `bookmark-jump-other-frame'
could also be defined the same way (either of those
ways). Or it could be defined by calling
`bookmark-jump-other-window' while binding
`pop-up-frames'. It doesn't matter to me which
approach is taken for that. And it shouldn't matter
to users - same behavior, AFAIK.
> If this command forces the use of the
> selected frame by binding some global variable instead of passing an
> appropriate action argument,
If the action argument passed just says to use another
frame then the result is the same, no? It certainly
seems the same in the question at hand,
`bookmark-jump-other-frame'. In both cases the
command "forces the use" of some particular display
action.
> 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.
A command that calls `switch-to-buffer' has different
behavior from one that pops to a buffer in another
window or frame. So what? We have different commands
for these possibilities. Each of those commands
"inhibits the user", providing only a specific
buffer-display behavior.
(But not `bookmark-jump' (or `bookmark--jump-via',
which is not a command) - it doesn't inhibit using it
to display a buffer anyway you like.)
> > 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.
Each of those specific bookmark jump commands
specifies a particular buffer-display behavior
(except `bookmark-jump', which accepts a behavior
argument). Is that what you call the application
overriding it?
Again, if you want specific display behavior you
can get it. If you want one of the predefined
behaviors you can have that too.
next prev parent reply other threads:[~2018-10-22 20:42 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
2018-10-22 20:42 ` Drew Adams [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f035e05-e04e-459c-b9a3-df1eb5542e65@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.