GNU bug report logs - #32421
26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Sat, 11 Aug 2018 16:51:01 UTC

Severity: wishlist

Found in version 26.1.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

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 32421 in the body.
You can then email your comments to 32421 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#32421; Package emacs. (Sat, 11 Aug 2018 16:51:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <tino.calancha <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 11 Aug 2018 16:51:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Sun, 12 Aug 2018 01:49:47 +0900
Severity: wishlist

Ibuffer reports locked buffers in its 3rd column.  A toggle for this
might be convenient.
--8<-----------------------------cut here---------------start------------->8---
commit c939fc542675d648d42c66d59b781fa2ab703897
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date:   Sun Aug 12 01:37:05 2018 +0900

    Ibuffer: Add toggle ibuffer-do-toggle-lock
    
    Toggle the locked status in marked buffers or the buffer
    at point (Bug#32421).
    * lisp/ibuffer.el (ibuffer-do-toggle-lock): New command.
    (ibuffer-mode-map): Bind it to 'L'.
    (ibuffer-mode-operate-map): Add entries for
    `ibuffer-do-toggle-read-only' and `ibuffer-do-toggle-lock'.
    * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.2):
    Announce the change.

diff --git a/etc/NEWS b/etc/NEWS
index a1c12a6766..6d432d857e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -45,6 +45,11 @@ often cause crashes.  Set it to nil if you really need those fonts.
 
 * Changes in Specialized Modes and Packages in Emacs 26.2
 
+** Ibuffer
+
+---
+*** New toggle 'ibuffer-do-toggle-lock'.
+
 ** Gnus
 
 ---
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 0a7bfe00a9..8bf089017b 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -590,6 +590,7 @@ ibuffer-mode-map
     (define-key map (kbd "R") 'ibuffer-do-rename-uniquely)
     (define-key map (kbd "S") 'ibuffer-do-save)
     (define-key map (kbd "T") 'ibuffer-do-toggle-read-only)
+    (define-key map (kbd "L") 'ibuffer-do-toggle-lock)
     (define-key map (kbd "r") 'ibuffer-do-replace-regexp)
     (define-key map (kbd "V") 'ibuffer-do-revert)
     (define-key map (kbd "W") 'ibuffer-do-view-and-eval)
@@ -862,6 +863,10 @@ ibuffer-mode-operate-map
       '(menu-item "Print" ibuffer-do-print))
     (define-key-after operate-map [do-toggle-modified]
       '(menu-item "Toggle modification flag" ibuffer-do-toggle-modified))
+    (define-key-after operate-map [do-toggle-read-only]
+      '(menu-item "Toggle read-only flag" ibuffer-do-toggle-read-only))
+    (define-key-after operate-map [do-toggle-lock]
+      '(menu-item "Toggle lock flag" ibuffer-do-toggle-lock))
     (define-key-after operate-map [do-revert]
       '(menu-item "Revert" ibuffer-do-revert
         :help "Revert marked buffers to their associated file"))
@@ -1361,6 +1366,16 @@ ibuffer-do-toggle-read-only
    :modifier-p t)
   (read-only-mode (if (integerp arg) arg 'toggle)))
 
+(define-ibuffer-op ibuffer-do-toggle-lock (&optional arg)
+  "Toggle locked status in marked buffers.
+If optional ARG is a non-negative integer, lock buffers.
+If ARG is a negative integer or 0, unlock buffers.
+Otherwise, toggle lock status."
+  (:opstring "toggled lock status in"
+   :interactive "P"
+   :modifier-p t)
+  (emacs-lock-mode (if (integerp arg) arg 'toggle)))
+
 (define-ibuffer-op ibuffer-do-delete ()
   "Kill marked buffers as with `kill-this-buffer'."
   (:opstring "killed"
@@ -2514,6 +2529,7 @@ ibuffer-mode
   `\\[ibuffer-do-view-other-frame]' - View the marked buffers in another frame.
   `\\[ibuffer-do-revert]' - Revert the marked buffers.
   `\\[ibuffer-do-toggle-read-only]' - Toggle read-only state of marked buffers.
+  `\\[ibuffer-do-toggle-lock]' - Toggle lock state of marked buffers.
   `\\[ibuffer-do-delete]' - Kill the marked buffers.
   `\\[ibuffer-do-isearch]' - Do incremental search in the marked buffers.
   `\\[ibuffer-do-isearch-regexp]' - Isearch for regexp in the marked buffers.
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-08-11
Repository revision: ec6f588940e51013435408a456c10d33ddf98fb2
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Debian GNU/Linux 9.5 (stretch)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32421; Package emacs. (Sat, 11 Aug 2018 17:19:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 32421 <at> debbugs.gnu.org
Subject: Re: bug#32421: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Sat, 11 Aug 2018 20:17:55 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Sun, 12 Aug 2018 01:49:47 +0900
> 
> Severity: wishlist
> 
> Ibuffer reports locked buffers in its 3rd column.  A toggle for this
> might be convenient.

Thanks.

> +** Ibuffer
> +
> +---
> +*** New toggle 'ibuffer-do-toggle-lock'.

Should this tell the key-binding of the new command?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32421; Package emacs. (Sat, 11 Aug 2018 17:23:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32421 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#32421: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Sun, 12 Aug 2018 02:21:58 +0900 (JST)

On Sat, 11 Aug 2018, Eli Zaretskii wrote:

>> +** Ibuffer
>> +
>> +---
>> +*** New toggle 'ibuffer-do-toggle-lock'.
>
> Should this tell the key-binding of the new command?

Good suggestion.  Changed to:
*** New toggle 'ibuffer-do-toggle-lock' bind to 'L'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32421; Package emacs. (Sat, 11 Aug 2018 17:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 32421 <at> debbugs.gnu.org
Subject: Re: bug#32421: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Sat, 11 Aug 2018 20:38:52 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Sun, 12 Aug 2018 02:21:58 +0900 (JST)
> cc: Tino Calancha <tino.calancha <at> gmail.com>, 32421 <at> debbugs.gnu.org
> 
> >> +*** New toggle 'ibuffer-do-toggle-lock'.
> >
> > Should this tell the key-binding of the new command?
> 
> Good suggestion.  Changed to:
> *** New toggle 'ibuffer-do-toggle-lock' bind to 'L'.

Make it

  *** New toggle 'ibuffer-do-toggle-lock', bound to 'L'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32421; Package emacs. (Sun, 12 Aug 2018 08:23:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32421 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#32421: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Sun, 12 Aug 2018 17:22:07 +0900 (JST)

On Sat, 11 Aug 2018, Eli Zaretskii wrote:

>> From: Tino Calancha <tino.calancha <at> gmail.com>
>> Date: Sun, 12 Aug 2018 02:21:58 +0900 (JST)
>> cc: Tino Calancha <tino.calancha <at> gmail.com>, 32421 <at> debbugs.gnu.org
>>
>>>> +*** New toggle 'ibuffer-do-toggle-lock'.
>>>
>>> Should this tell the key-binding of the new command?
>>
>> Good suggestion.  Changed to:
>> *** New toggle 'ibuffer-do-toggle-lock' bind to 'L'.
>
> Make it
>
>  *** New toggle 'ibuffer-do-toggle-lock', bound to 'L'.
OK.  Thank you.





Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Mon, 13 Aug 2018 10:33:02 GMT) Full text and rfc822 format available.

Notification sent to Tino Calancha <tino.calancha <at> gmail.com>:
bug acknowledged by developer. (Mon, 13 Aug 2018 10:33:02 GMT) Full text and rfc822 format available.

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

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 32421-done <at> debbugs.gnu.org
Subject: Re: bug#32421: 26.1.50; Ibuffer: Add toggle ibuffer-do-toggle-lock
Date: Mon, 13 Aug 2018 19:32:00 +0900
Tino Calancha <tino.calancha <at> gmail.com> writes:

> On Sat, 11 Aug 2018, Eli Zaretskii wrote:
>
>>> From: Tino Calancha <tino.calancha <at> gmail.com>
>>> Date: Sun, 12 Aug 2018 02:21:58 +0900 (JST)
>>> cc: Tino Calancha <tino.calancha <at> gmail.com>, 32421 <at> debbugs.gnu.org
>>>
>>>>> +*** New toggle 'ibuffer-do-toggle-lock'.
>>>>
>>>> Should this tell the key-binding of the new command?
>>>
>>> Good suggestion.  Changed to:
>>> *** New toggle 'ibuffer-do-toggle-lock' bind to 'L'.
>>
>> Make it
>>
>>  *** New toggle 'ibuffer-do-toggle-lock', bound to 'L'.
> OK.  Thank you.
Implemented in emacs-26 branch as commit
'Ibuffer: Add toggle ibuffer-do-toggle-lock'
(e73e6838aa595e5a3d217480c96b1d04d3d1cb16)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Sep 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 341 days ago.

Previous Next


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