From: Richard Kim <emacs18@gmail.com>
To: 41888@debbugs.gnu.org
Subject: bug#41888: further explanation of the patch against gud.el
Date: Sat, 20 Jun 2020 07:57:53 -0700 [thread overview]
Message-ID: <CAFq8O8t=M+Yvg-3Q1NfQfSYWigPnHPZFQs6O8wss+6b98CNE8Q@mail.gmail.com> (raw)
In-Reply-To: <87366vv7yn.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1715 bytes --]
Let me explain my understanding of the problem and my rationale for the
patch I emailed to emacs list.
Emacs 27 has the following code in `gud.el' starting around line 2622:
,----
| (display-buffer
| (get-buffer-create (concat "*gud" filepart "*"))
| '(display-buffer-reuse-window
| display-buffer-in-previous-window
| display-buffer-same-window display-buffer-pop-up-window))
`----
The patch I emailed to emacs list is to add extra pair of parenthesis
like this:
,----
| (display-buffer
| (get-buffer-create (concat "*gud" filepart "*"))
| '((display-buffer-reuse-window
| display-buffer-in-previous-window
| display-buffer-same-window display-buffer-pop-up-window)))
`----
The change affects the second argument passed to `display-buffer'
function, i.e., the `ACTION' argument. The doc-string for this argument
is quoted here:
Optional argument ACTION, if non-nil, should specify a
buffer display action of the form (FUNCTIONS . ALIST).
FUNCTIONS is either an "action function" or a possibly empty
list of action functions. ALIST is a possibly empty "action
alist".
The question is the syntax of `FUNCTIONS' portion of `ACTION' argument.
The doc-string clearly says that `FUNCITONS' is either a function or a
list of functions. If `FUNCTIONS' is a list such as `(f1 f2 f3)', then
`ACTION' should be something like `((f1 f2 f3))' assuming that `ALIST'
is `nil'. Well the list of functions is surrounded by two pairs of
parenthesis rather than one pair.
This observation along with the fact that adding the extra pair of
parenthesis allows me to launch `gdb' is the reason why I sent the patch
to emacs list.
[-- Attachment #2: Type: text/html, Size: 2041 bytes --]
next prev parent reply other threads:[~2020-06-20 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 6:30 bug#41888: 27.0.91; fix ACTION argument of display-buffer Richard Kim
2020-06-20 14:57 ` Richard Kim [this message]
2020-06-27 7:41 ` Eli Zaretskii
2020-06-28 6:37 ` martin rudalics
2020-06-28 14:06 ` Eli Zaretskii
2020-06-28 2:41 ` bug#41888: gdb does not work with spacemacs on emacs 27 Richard Kim
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='CAFq8O8t=M+Yvg-3Q1NfQfSYWigPnHPZFQs6O8wss+6b98CNE8Q@mail.gmail.com' \
--to=emacs18@gmail.com \
--cc=41888@debbugs.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 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.