GNU bug report logs - #12795
24.2.50; ibuffers mark commands are quirky

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> fh-trier.de>

Date: Sun, 4 Nov 2012 00:51:01 UTC

Severity: minor

Tags: patch

Found in version 24.2.50

Done: Chong Yidong <cyd <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 12795 in the body.
You can then email your comments to 12795 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12795; Package emacs. (Sun, 04 Nov 2012 00:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Politz <politza <at> fh-trier.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Nov 2012 00:51:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Politz <politza <at> fh-trier.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; ibuffers mark commands are quirky
Date: Sun, 04 Nov 2012 01:47:06 +0100
Hey Emacs guys !

I found some problems with ibuffers movement commands: The mark commands
in ibuffer use a "P" interactive spec and error on C-u prefix args. They
don't support negative arguments and the backwards unmarking behaviour
is non-standard (= dired).  The attached patch addresses these points.

-ap

diff -c -L /usr/share/emacs/24.2.50/lisp/ibuffer.el.gz -L \#\<buffer\ ibuffer.el.gz\> /tmp/jka-com2962CdI /tmp/buffer-content-2962cxU
*** /usr/share/emacs/24.2.50/lisp/ibuffer.el.gz
--- #<buffer ibuffer.el.gz>
***************
*** 1359,1382 ****
  (defun ibuffer-mark-forward (arg)
    "Mark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "P")
!   (ibuffer-mark-interactive arg ibuffer-marked-char 1))
  
  (defun ibuffer-unmark-forward (arg)
    "Unmark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "P")
!   (ibuffer-mark-interactive arg ?\s 1))
  
  (defun ibuffer-unmark-backward (arg)
    "Unmark the buffer on this line, and move backward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "P")
!   (ibuffer-mark-interactive arg ?\s -1))
  
! (defun ibuffer-mark-interactive (arg mark movement)
    (ibuffer-assert-ibuffer-mode)
    (or arg (setq arg 1))
    (ibuffer-forward-line 0)
    (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
        (progn
--- 1359,1385 ----
  (defun ibuffer-mark-forward (arg)
    "Mark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "p")
!   (ibuffer-mark-interactive arg ibuffer-marked-char))
  
  (defun ibuffer-unmark-forward (arg)
    "Unmark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "p")
!   (ibuffer-mark-interactive arg ?\s))
  
  (defun ibuffer-unmark-backward (arg)
    "Unmark the buffer on this line, and move backward ARG lines.
  If point is on a group name, this function operates on that group."
!   (interactive "p")
!   (ibuffer-unmark-forward (- arg)))
  
! (defun ibuffer-mark-interactive (arg mark &optional movement)
    (ibuffer-assert-ibuffer-mode)
    (or arg (setq arg 1))
+   ;; deprecated movement argument
+   (when (and movement (< movement 0))
+     (setq arg (- arg)))
    (ibuffer-forward-line 0)
    (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
        (progn
***************
*** 1386,1393 ****
      (let ((inhibit-read-only t))
        (while (> arg 0)
  	(ibuffer-set-mark mark)
! 	(ibuffer-forward-line movement t)
! 	(setq arg (1- arg))))))
  
  (defun ibuffer-set-mark (mark)
    (ibuffer-assert-ibuffer-mode)
--- 1389,1400 ----
      (let ((inhibit-read-only t))
        (while (> arg 0)
  	(ibuffer-set-mark mark)
! 	(ibuffer-forward-line 1 t)
! 	(setq arg (1- arg)))
!       (while (< arg 0)
! 	(ibuffer-forward-line -1 t)
! 	(ibuffer-set-mark mark)
! 	(setq arg (1+ arg))))))
  
  (defun ibuffer-set-mark (mark)
    (ibuffer-assert-ibuffer-mode)

Diff finished.  Sun Nov  4 01:32:54 2012




Reply sent to Chong Yidong <cyd <at> gnu.org>:
You have taken responsibility. (Sat, 17 Nov 2012 07:17:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Politz <politza <at> fh-trier.de>:
bug acknowledged by developer. (Sat, 17 Nov 2012 07:17:02 GMT) Full text and rfc822 format available.

Message #10 received at 12795-done <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Andreas Politz <politza <at> fh-trier.de>
Cc: 12795-done <at> debbugs.gnu.org
Subject: Re: bug#12795: 24.2.50; ibuffers mark commands are quirky
Date: Sat, 17 Nov 2012 15:15:33 +0800
Andreas Politz <politza <at> fh-trier.de> writes:

> I found some problems with ibuffers movement commands: The mark commands
> in ibuffer use a "P" interactive spec and error on C-u prefix args. They
> don't support negative arguments and the backwards unmarking behaviour
> is non-standard (= dired).  The attached patch addresses these points.

Thanks, committed to trunk.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Dec 2012 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.