GNU bug report logs - #76222
[PATCH] define-ibuffer-op supports opstring active-opstring as functions

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Wed, 12 Feb 2025 11:23:01 UTC

Severity: wishlist

Tags: patch

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 76222 in the body.
You can then email your comments to 76222 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#76222; Package emacs. (Wed, 12 Feb 2025 11:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ship Mints <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Feb 2025 11:23:02 GMT) Full text and rfc822 format available.

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

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] define-ibuffer-op supports opstring active-opstring as
 functions
Date: Wed, 12 Feb 2025 06:22:03 -0500
[Message part 1 (text/plain, inline)]
This enables optional dynamic string prompts. Very useful. Here's a
simplified example.

(defun ibuffer-prompt-helper (op)
  (let ((something-i-need (get-something-i-need)))
    (format "%s from %s:" op
            (if something-i-need
                (format "something \"%s\" " something-i-need)
              ""))))

(define-ibuffer-op ibuffer-do-remove-something ()
  "Remove something."
  (
   :active-opstring (lambda ()
                      (ibuffer-prompt-helper "remove"))
   :opstring (lambda ()
               (ibuffer-prompt-helper "removed"))
   :modifier-p t
   :dangerous t
   :complex t
   :after (ibuffer-update nil t)
   )
  (progn
    ;; remove the thing
    ))

-Stephane
[Message part 2 (text/html, inline)]
[0001-define-ibuffer-op-supports-opstring-active-opstring-.patch (application/octet-stream, attachment)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 13 Feb 2025 06:56:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76222; Package emacs. (Sat, 22 Feb 2025 09:35:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76222 <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 11:34:04 +0200
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Wed, 12 Feb 2025 06:22:03 -0500
> 
> This enables optional dynamic string prompts. Very useful. Here's a simplified example.
> 
> (defun ibuffer-prompt-helper (op)
>   (let ((something-i-need (get-something-i-need)))
>     (format "%s from %s:" op
>             (if something-i-need
>                 (format "something \"%s\" " something-i-need)
>               ""))))
> 
> (define-ibuffer-op ibuffer-do-remove-something ()
>   "Remove something."
>   (
>    :active-opstring (lambda ()
>                       (ibuffer-prompt-helper "remove"))
>    :opstring (lambda ()
>                (ibuffer-prompt-helper "removed"))
>    :modifier-p t
>    :dangerous t
>    :complex t
>    :after (ibuffer-update nil t)
>    )
>   (progn
>     ;; remove the thing
>     ))

Thanks.  This needs a NEWS entry to announce the change.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76222; Package emacs. (Sat, 22 Feb 2025 10:31:03 GMT) Full text and rfc822 format available.

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

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76222 <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 05:30:14 -0500
[Message part 1 (text/plain, inline)]
Attached. Thank you.

On Sat, Feb 22, 2025 at 4:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Wed, 12 Feb 2025 06:22:03 -0500
> >
> > This enables optional dynamic string prompts. Very useful. Here's a
> simplified example.
> >
> > (defun ibuffer-prompt-helper (op)
> >   (let ((something-i-need (get-something-i-need)))
> >     (format "%s from %s:" op
> >             (if something-i-need
> >                 (format "something \"%s\" " something-i-need)
> >               ""))))
> >
> > (define-ibuffer-op ibuffer-do-remove-something ()
> >   "Remove something."
> >   (
> >    :active-opstring (lambda ()
> >                       (ibuffer-prompt-helper "remove"))
> >    :opstring (lambda ()
> >                (ibuffer-prompt-helper "removed"))
> >    :modifier-p t
> >    :dangerous t
> >    :complex t
> >    :after (ibuffer-update nil t)
> >    )
> >   (progn
> >     ;; remove the thing
> >     ))
>
> Thanks.  This needs a NEWS entry to announce the change.
>
[Message part 2 (text/html, inline)]
[0001-define-ibuffer-op-opstring-active-opstring-functions.patch (application/octet-stream, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 22 Feb 2025 11:39:02 GMT) Full text and rfc822 format available.

Notification sent to Ship Mints <shipmints <at> gmail.com>:
bug acknowledged by developer. (Sat, 22 Feb 2025 11:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76222-done <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 13:38:07 +0200
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sat, 22 Feb 2025 05:30:14 -0500
> Cc: 76222 <at> debbugs.gnu.org
> 
> Attached. Thank you.
> 
> From 32221656a5c7d8cd7d16a7bb455047cc66a38003 Mon Sep 17 00:00:00 2001
> From: shipmints <shipmints <at> gmail.com>
> Date: Wed, 12 Feb 2025 06:09:38 -0500
> Subject: [PATCH] define-ibuffer-op opstring active-opstring functions
>  (bug#76222)
> 
> * list/ibuf-macs.el: (define-ibuffer-op)
> opstring and active-opstring can be strings or functions.

You write the log entries by hand, don't you?  The above should be
"lisp/ibuf-macs.el", not "list/ibuf-macs.el".  Also, the change in
NEWS was not in the log.  I fixed that for you, but please try to
double-check these aspects in the future.

Installed on master and closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76222; Package emacs. (Sat, 22 Feb 2025 11:51:03 GMT) Full text and rfc822 format available.

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

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76222-done <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 06:50:26 -0500
[Message part 1 (text/plain, inline)]
Thanks for the amendments.

On Sat, Feb 22, 2025 at 6:38 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sat, 22 Feb 2025 05:30:14 -0500
> > Cc: 76222 <at> debbugs.gnu.org
> >
> > Attached. Thank you.
> >
> > From 32221656a5c7d8cd7d16a7bb455047cc66a38003 Mon Sep 17 00:00:00 2001
> > From: shipmints <shipmints <at> gmail.com>
> > Date: Wed, 12 Feb 2025 06:09:38 -0500
> > Subject: [PATCH] define-ibuffer-op opstring active-opstring functions
> >  (bug#76222)
> >
> > * list/ibuf-macs.el: (define-ibuffer-op)
> > opstring and active-opstring can be strings or functions.
>
> You write the log entries by hand, don't you?  The above should be
> "lisp/ibuf-macs.el", not "list/ibuf-macs.el".  Also, the change in
> NEWS was not in the log.  I fixed that for you, but please try to
> double-check these aspects in the future.
>
> Installed on master and closing the bug.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76222; Package emacs. (Sat, 22 Feb 2025 13:34:03 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Ship Mints <shipmints <at> gmail.com>
Cc: 76222-done <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 13:32:56 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

> You write the log entries by hand, don't you?

Please ignore if this is not relevant, but see "Generating ChangeLog
entries" in CONTRIBUTE if you haven't already.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76222; Package emacs. (Sat, 22 Feb 2025 13:51:02 GMT) Full text and rfc822 format available.

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

From: Ship Mints <shipmints <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76222-done <at> debbugs.gnu.org
Subject: Re: bug#76222: [PATCH] define-ibuffer-op supports opstring
 active-opstring as functions
Date: Sat, 22 Feb 2025 08:50:23 -0500
[Message part 1 (text/plain, inline)]
I'll give that a try in magit, though maybe I should try vc more.

On Sat, Feb 22, 2025 at 8:32 AM Stefan Kangas <stefankangas <at> gmail.com>
wrote:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > You write the log entries by hand, don't you?
>
> Please ignore if this is not relevant, but see "Generating ChangeLog
> entries" in CONTRIBUTE if you haven't already.
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Mar 2025 11:24:17 GMT) Full text and rfc822 format available.

This bug report was last modified 167 days ago.

Previous Next


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