GNU bug report logs -
#41888
27.0.91; fix ACTION argument of display-buffer
Previous Next
Reported by: emacs18 <at> gmail.com
Date: Tue, 16 Jun 2020 06:31:01 UTC
Severity: normal
Found in version 27.0.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41888 in the body.
You can then email your comments to 41888 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41888
; Package
emacs
.
(Tue, 16 Jun 2020 06:31:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
emacs18 <at> gmail.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 16 Jun 2020 06:31:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
gud-common-init function in emacs 27 seems to have a bug in how it calls
display-buffer. The second argument passed is ACTION. According to
docstring of display-buffer, the list of functions need to be a list
within a list. The attached patch adds the missing extra pair of
parenthesis.
[0001-fixed-ACTION-argument-of-display-buffer-call.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
In GNU Emacs 27.0.91 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.18)
of 2020-06-12 built on kimr-laptop
Repository revision: 22f4fba8a903874ba63f8f479fa40b1dfe12850f
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 20.04 LTS
Recent messages:
Saving file /home/kimr/repos/e/emacs/lisp/progmodes/gud.el...
Wrote /home/kimr/repos/e/emacs/lisp/progmodes/gud.el
~/repos/e/emacs/lisp/progmodes
Quit
Mark set [2 times]
Using try-expand-line
No further expansions found
No expansion found [5 times]
Quit
Mark set [5 times]
Configured using:
'configure '--program-transform-name=s/^ctags$/ctags.emacs/'
--with-file-notification=yes --with-imagemagick --with-modules
--with-pdumper=yes --with-sound=yes --with-x-toolkit=yes --with-xml2
--without-compress-install --with-gif=no --prefix
/home/kimr/opt/emacs27/20200612 CFLAGS=-O3'
Configured features:
XPM JPEG TIFF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41888
; Package
emacs
.
(Sat, 20 Jun 2020 14:59:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 41888 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41888
; Package
emacs
.
(Sat, 27 Jun 2020 07:42:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 41888 <at> debbugs.gnu.org (full text, mbox):
> From: Richard Kim <emacs18 <at> gmail.com>
> Date: Mon, 15 Jun 2020 23:30:08 -0700
>
> gud-common-init function in emacs 27 seems to have a bug in how it calls
> display-buffer. The second argument passed is ACTION. According to
> docstring of display-buffer, the list of functions need to be a list
> within a list. The attached patch adds the missing extra pair of
> parenthesis.
Martin, any comments or suggestions?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41888
; Package
emacs
.
(Sun, 28 Jun 2020 02:42:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 41888 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Without the patch I provided before, gdb fails to star on spacemacs as
reported via
https://github.com/syl20bnr/spacemacs/issues/13693
The root cause is that gdb problem is exposed when window-purpose package
is used. For details see
https://github.com/bmag/emacs-purpose/issues/163
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41888
; Package
emacs
.
(Sun, 28 Jun 2020 06:39:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 41888 <at> debbugs.gnu.org (full text, mbox):
>> gud-common-init function in emacs 27 seems to have a bug in how it calls
>> display-buffer. The second argument passed is ACTION. According to
>> docstring of display-buffer, the list of functions need to be a list
>> within a list. The attached patch adds the missing extra pair of
>> parenthesis.
>
> Martin, any comments or suggestions?
I think that Richard is right and his patch will fix the problem.
martin
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sun, 28 Jun 2020 14:08:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
emacs18 <at> gmail.com
:
bug acknowledged by developer.
(Sun, 28 Jun 2020 14:08:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 41888-done <at> debbugs.gnu.org (full text, mbox):
> Cc: 41888 <at> debbugs.gnu.org
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Sun, 28 Jun 2020 08:37:56 +0200
>
> >> gud-common-init function in emacs 27 seems to have a bug in how it calls
> >> display-buffer. The second argument passed is ACTION. According to
> >> docstring of display-buffer, the list of functions need to be a list
> >> within a list. The attached patch adds the missing extra pair of
> >> parenthesis.
> >
> > Martin, any comments or suggestions?
>
> I think that Richard is right and his patch will fix the problem.
Thanks, pushed to the emacs-27 branch.
Richard, in the future please accompany your changes with a
ChangeLog-style commit log message, as described in CONTRIBUTE. (I
wrote the log message for you this time.)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 27 Jul 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.