* bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer
@ 2009-02-23 21:25 Xavier Maillard
0 siblings, 0 replies; 5+ messages in thread
From: Xavier Maillard @ 2009-02-23 21:25 UTC (permalink / raw)
To: Geoff Gole; +Cc: emacs-pretest-bug
In ibuffer, running ibuffer-toggle-sorting-mode will produce a useful
message telling the user what the buffer is now sorted by. That
message is immediately clobbered by an useless `Mark set' message
(useless because ibuffer stomps all over any such mark).
Confirmed. Your patch fixed that oddity.
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer
@ 2009-02-23 2:26 Geoff Gole
2009-02-25 16:30 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Geoff Gole @ 2009-02-23 2:26 UTC (permalink / raw)
To: emacs-pretest-bug
In ibuffer, running ibuffer-toggle-sorting-mode will produce a useful
message telling the user what the buffer is now sorted by. That
message is immediately clobbered by an useless `Mark set' message
(useless because ibuffer stomps all over any such mark).
To reproduce:
emacs -Q
M-x ibuffer
,
C-h e and observe that both "Sorting by ..." and "Mark set" appear
A patch follows (against GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+
Version 2.12.11) of 2008-11-22 on elegiac, modified by Debian).
diff -c -L /usr/share/emacs/23.0.60/lisp/ibuffer.el.gz -L
/tmp/buffer-content-31328m2 /tmp/jka-com3132uwF
/tmp/buffer-content-31328m2
*** /usr/share/emacs/23.0.60/lisp/ibuffer.el.gz
--- /tmp/buffer-content-31328m2
***************
*** 2277,2283 ****
(setq buffer-read-only t)
(set-buffer-modified-p ibuffer-did-modification)
(setq ibuffer-did-modification nil)
! (goto-line (1+ orig)))))
(defun ibuffer-quit ()
"Quit this `ibuffer' session.
--- 2277,2284 ----
(setq buffer-read-only t)
(set-buffer-modified-p ibuffer-did-modification)
(setq ibuffer-did-modification nil)
! (goto-char 1)
! (forward-line orig))))
(defun ibuffer-quit ()
"Quit this `ibuffer' session.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer
2009-02-23 2:26 Geoff Gole
@ 2009-02-25 16:30 ` Stefan Monnier
2009-02-25 16:51 ` Juanma Barranquero
2009-02-26 5:00 ` Geoff Gole
0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2009-02-25 16:30 UTC (permalink / raw)
To: Geoff Gole; +Cc: 2439, emacs-pretest-bug
> ! (goto-char 1)
> ! (forward-line orig))))
Thanks for your patch, but please try to avoid hardcoding "1" as above.
Just use (point-min) instead.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer
2009-02-25 16:30 ` Stefan Monnier
@ 2009-02-25 16:51 ` Juanma Barranquero
2009-02-26 5:00 ` Geoff Gole
1 sibling, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2009-02-25 16:51 UTC (permalink / raw)
To: Stefan Monnier, 2439; +Cc: Geoff Gole
On Wed, Feb 25, 2009 at 17:30, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Thanks for your patch, but please try to avoid hardcoding "1" as above.
> Just use (point-min) instead.
What is the point, when having a narrowed buffer would be an error?
In this case,
(goto-char 1)
(forward-line orig)
is not the same as
(goto-line (1+ orig))
because `goto-line' uses `(save-restriction (widen) ...)'. So, if
anything, is not that the patch should use `point-min', but that it
should use
(save-restriction
(widen)
(goto-char 1)
(forward-line orig))
though I don't think narrowing the ibuffer buffer and then sorting is
a common enough operation to worry about it. Same for bs-down, where I
implemented the same fix.
Juanma
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer
2009-02-25 16:30 ` Stefan Monnier
2009-02-25 16:51 ` Juanma Barranquero
@ 2009-02-26 5:00 ` Geoff Gole
1 sibling, 0 replies; 5+ messages in thread
From: Geoff Gole @ 2009-02-26 5:00 UTC (permalink / raw)
To: Stefan Monnier, emacs-pretest-bug, 2439, lekktu
> Thanks for your patch, but please try to avoid hardcoding "1" as above.
> Just use (point-min) instead.
Good point. I took a peek at the source of goto-line to see if it did
anything that I'd need to replicate, and grabbed the line from there
without thinking.
Should goto-line also use (point-min)?
> I don't think narrowing the ibuffer buffer and then sorting is
> a common enough operation to worry about it.
I didn't bother with handling restrictions, as they don't seem to be
respected by ibuffer. Narrowed ibuffer buffers will either behave
strangely or simply clobber the restriction.
Perhaps I should have mentioned that in a comment or when submitting the patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-26 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 21:25 bug#2439: 23.0.60; [patch] `Mark set' clobbers useful message in ibuffer Xavier Maillard
-- strict thread matches above, loose matches on Subject: below --
2009-02-23 2:26 Geoff Gole
2009-02-25 16:30 ` Stefan Monnier
2009-02-25 16:51 ` Juanma Barranquero
2009-02-26 5:00 ` Geoff Gole
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.