GNU bug report logs -
#12387
24.2.50; File column printed by list-buffers is bad if done in dired-mode
Previous Next
Reported by: emacs18 <at> gmail.com
Date: Sat, 8 Sep 2012 15:52:02 UTC
Severity: normal
Merged with 12662
Found in version 24.2.50
Done: Glenn Morris <rgm <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 12387 in the body.
You can then email your comments to 12387 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#12387
; Package
emacs
.
(Sat, 08 Sep 2012 15:52:02 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
.
(Sat, 08 Sep 2012 15:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Start emacs (latest bzr version as of Sep 6, 2012) with -q option.
Type `C-x C-B'. The content of *Buffer *List should be as expected, e.g.,
.% *GNU Emacs* 809 Fundamental
*scratch* 191 Lisp Interaction
* *Messages* 66 Fundamental
Now bring up any buffer in dired mode, e.g., C-x C-f followed by "/etc" and
RETURN. While current buffer is within a dired-mode, hit `C-x C-B' again. The
last column (the File column) incorrectly shows that the values are all "/etc/":
.% etc 18180 Dired by name /etc/
% *GNU Emacs* 809 Fundamental /etc/
*scratch* 191 Lisp Interaction /etc/
* *Messages* 85 Fundamental /etc/
Now switch to *Buffer List* buffer, then hit 'g' to refresh the content.
Now it shows
% etc 18180 Dired by name
% *GNU Emacs* 809 Fundamental
*scratch* 191 Lisp Interaction
* *Messages* 85 Fundamental
Following is a work-around that I cooked up for my own use till this bug is fixed.
This also should clarify what the problem is.
(defadvice list-buffers
(after unset-buffer-file-name-in-dired-mode activate compile)
"This works around a bug in emacs-trunk introduced around Aug 2012 where
list-buffers shows invalid entries in the File column displayed when the
list-buffers is executed within dired buffer. The work around is to refresh
the content of the *Buffer List* buffer after making sure that current buffer
is not a buffer in dired-mode."
(when (eq major-mode 'dired-mode)
(save-excursion
(other-window 1)
(revert-buffer))))
In GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
of 2012-09-08 on kimr-laptop
Bzr revision: 109937 rudalics <at> gmx.at-20120908132811-ycvntpb4znz8wyya
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Configured using:
`configure '--prefix' '/u/kimr/usr''
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12387
; Package
emacs
.
(Thu, 13 Sep 2012 07:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12387 <at> debbugs.gnu.org (full text, mbox):
Seems that format-mode-line (as of ~ 1 month) fails to preserve
current-buffer:
Evalute in *scratch*:
(let ((buffer (get-buffer "*Messages*")))
(with-current-buffer buffer
(message "1 %s" (current-buffer))
(format-mode-line mode-name nil nil buffer)
(message "2 %s" (current-buffer))))
->
1 *Messages*
2 *scratch*
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12387
; Package
emacs
.
(Thu, 13 Sep 2012 09:39:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 12387 <at> debbugs.gnu.org (full text, mbox):
> Seems that format-mode-line (as of ~ 1 month) fails to preserve
> current-buffer:
>
> Evalute in *scratch*:
>
> (let ((buffer (get-buffer "*Messages*")))
> (with-current-buffer buffer
> (message "1 %s" (current-buffer))
> (format-mode-line mode-name nil nil buffer)
> (message "2 %s" (current-buffer))))
Looks like a fallout from my
2012-08-20 Martin Rudalics <rudalics <at> gmx.at>
* window.c (select_window): Always make selected window's buffer
current.
Does the patch below fix it?
martin
=== modified file 'src/xdisp.c'
--- src/xdisp.c 2012-09-12 00:14:50 +0000
+++ src/xdisp.c 2012-09-13 09:31:34 +0000
@@ -21039,8 +21039,7 @@
: EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
: DEFAULT_FACE_ID;
- if (XBUFFER (buffer) != current_buffer)
- old_buffer = current_buffer;
+ old_buffer = current_buffer;
/* Save things including mode_line_proptrans_alist,
and set that to nil so that we don't alter the outer value. */
@@ -21051,8 +21050,7 @@
mode_line_proptrans_alist = Qnil;
Fselect_window (window, Qt);
- if (old_buffer)
- set_buffer_internal_1 (XBUFFER (buffer));
+ set_buffer_internal_1 (XBUFFER (buffer));
init_iterator (&it, w, -1, -1, NULL, face_id);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12387
; Package
emacs
.
(Thu, 13 Sep 2012 17:09:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 12387 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 13 Sep 2012 11:37:07 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> Cc: 12387 <at> debbugs.gnu.org, emacs18 <at> gmail.com
>
> Does the patch below fix it?
>
> martin
>
> === modified file 'src/xdisp.c'
> --- src/xdisp.c 2012-09-12 00:14:50 +0000
> +++ src/xdisp.c 2012-09-13 09:31:34 +0000
> @@ -21039,8 +21039,7 @@
> : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
> : DEFAULT_FACE_ID;
>
> - if (XBUFFER (buffer) != current_buffer)
> - old_buffer = current_buffer;
> + old_buffer = current_buffer;
>
> /* Save things including mode_line_proptrans_alist,
> and set that to nil so that we don't alter the outer value. */
> @@ -21051,8 +21050,7 @@
> mode_line_proptrans_alist = Qnil;
>
> Fselect_window (window, Qt);
> - if (old_buffer)
> - set_buffer_internal_1 (XBUFFER (buffer));
> + set_buffer_internal_1 (XBUFFER (buffer));
>
> init_iterator (&it, w, -1, -1, NULL, face_id);
IMO, that's exactly what needs to be done. The attempts to avoid
calling set_buffer_internal_1 are a classical case of premature
optimization, since that function already knows how to avoid changing
to the same buffer.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12387
; Package
emacs
.
(Fri, 14 Sep 2012 09:02:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 12387 <at> debbugs.gnu.org (full text, mbox):
> IMO, that's exactly what needs to be done. The attempts to avoid
> calling set_buffer_internal_1 are a classical case of premature
> optimization, since that function already knows how to avoid changing
> to the same buffer.
Installed.
martin
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 14 Sep 2012 17:10:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
emacs18 <at> gmail.com
:
bug acknowledged by developer.
(Fri, 14 Sep 2012 17:10:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 12387-done <at> debbugs.gnu.org (full text, mbox):
martin rudalics wrote:
> Installed.
Thanks, works for me.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 13 Oct 2012 11:24:03 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Oct 2012 07:02:02 GMT)
Full text and
rfc822 format available.
Forcibly Merged 12387 12662.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 17 Oct 2012 07:02:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 14 Nov 2012 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.