GNU bug report logs - #37470
26.3; [PATCH] Default value and type of message-make-forward-subject-function

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Fri, 20 Sep 2019 09:24:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.3

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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 37470 in the body.
You can then email your comments to 37470 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#37470; Package emacs. (Fri, 20 Sep 2019 09:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damien Cassou <damien <at> cassou.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Sep 2019 09:24:02 GMT) Full text and rfc822 format available.

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

From: Damien Cassou <damien <at> cassou.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; [PATCH] Default value and type of
 message-make-forward-subject-function
Date: Fri, 20 Sep 2019 11:08:42 +0200
[Message part 1 (text/plain, inline)]
Please find attached a patch fixing the default value and type of
message-make-forward-subject-function.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
[0001-Change-default-value-of-message-make-forward-subject.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37470; Package emacs. (Fri, 20 Sep 2019 10:03:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Damien Cassou <damien <at> cassou.me>
Cc: 37470 <at> debbugs.gnu.org
Subject: Re: bug#37470: 26.3; [PATCH] Default value and type of
 message-make-forward-subject-function
Date: Fri, 20 Sep 2019 12:02:15 +0200
>>>>> On Fri, 20 Sep 2019 11:08:42 +0200, Damien Cassou <damien <at> cassou.me> said:

    Damien> Please find attached a patch fixing the default value and type of
    Damien> message-make-forward-subject-function.
    Damien> +  :type '(repeat :tag "List of functions"
    Damien> +                 (radio (function-item message-forward-subject-author-subject)
    Damien> +                        (function-item message-forward-subject-fwd)
    Damien> +                        (function-item message-forward-subject-name-subject)
    Damien> +                        (function))))

I donʼt see how this could work: 'radio allows selecting only one from
the list. How about something like this:

diff --git i/lisp/gnus/message.el w/lisp/gnus/message.el
index 48d79107ea..1a1cb79039 100644
--- i/lisp/gnus/message.el
+++ w/lisp/gnus/message.el
@@ -532,7 +532,7 @@ message-user-organization-file
   :group 'message-headers)
 
 (defcustom message-make-forward-subject-function
-  #'message-forward-subject-name-subject
+  (list #'message-forward-subject-name-subject)
   "List of functions called to generate subject headers for forwarded messages.
 The subject generated by the previous function is passed into each
 successive function.
@@ -547,10 +547,11 @@ message-make-forward-subject-function
       to it."
   :group 'message-forwarding
   :link '(custom-manual "(message)Forwarding")
-  :type '(radio (function-item message-forward-subject-author-subject)
-		(function-item message-forward-subject-fwd)
-		(function-item message-forward-subject-name-subject)
-		(repeat :tag "List of functions" function)))
+  :type '(set :tag "List of functions"
+              (function-item message-forward-subject-author-subject)
+              (function-item message-forward-subject-fwd)
+              (function-item message-forward-subject-name-subject)
+              (repeat :tag "User functions" :inline t (function :tag "Function"))))
 
 (defcustom message-forward-as-mime nil
   "Non-nil means forward messages as an inline/rfc822 MIME section.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37470; Package emacs. (Fri, 20 Sep 2019 10:23:01 GMT) Full text and rfc822 format available.

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

From: Damien Cassou <damien <at> cassou.me>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 37470 <at> debbugs.gnu.org
Subject: Re: bug#37470: 26.3; [PATCH] Default value and type of
 message-make-forward-subject-function
Date: Fri, 20 Sep 2019 12:22:21 +0200
Hi Robert,

Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Fri, 20 Sep 2019 11:08:42 +0200, Damien Cassou <damien <at> cassou.me> said:
>
>     Damien> Please find attached a patch fixing the default value and type of
>     Damien> message-make-forward-subject-function.
>     Damien> +  :type '(repeat :tag "List of functions"
>     Damien> +                 (radio (function-item message-forward-subject-author-subject)
>     Damien> +                        (function-item message-forward-subject-fwd)
>     Damien> +                        (function-item message-forward-subject-name-subject)
>     Damien> +                        (function))))
>
> I donʼt see how this could work: 'radio allows selecting only one from
> the list.


but the 'radio is embedded within a 'repeat which seems to be exactly
what I want.


> How about something like this:
> +  :type '(set :tag "List of functions"
> +              (function-item message-forward-subject-author-subject)
> +              (function-item message-forward-subject-fwd)
> +              (function-item message-forward-subject-name-subject)
> +              (repeat :tag "User functions" :inline t (function :tag "Function"))))


this doesn't work because order of functions has a meaning (e.g., adding
"Fwd:" before the author or after the author).

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37470; Package emacs. (Fri, 20 Sep 2019 12:15:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Damien Cassou <damien <at> cassou.me>
Cc: 37470 <at> debbugs.gnu.org
Subject: Re: bug#37470: 26.3; [PATCH] Default value and type of
 message-make-forward-subject-function
Date: Fri, 20 Sep 2019 14:14:10 +0200
>>>>> On Fri, 20 Sep 2019 12:22:21 +0200, Damien Cassou <damien <at> cassou.me> said:
    Damien> but the 'radio is embedded within a 'repeat which seems to be exactly
    Damien> what I want.

Oh, I misunderstood what you wanted. Yes, your way works fine.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37470; Package emacs. (Fri, 20 Sep 2019 17:30:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Damien Cassou <damien <at> cassou.me>
Cc: 37470 <at> debbugs.gnu.org
Subject: Re: bug#37470: 26.3; [PATCH] Default value and type of
 message-make-forward-subject-function
Date: Fri, 20 Sep 2019 19:28:57 +0200
Damien Cassou <damien <at> cassou.me> writes:

> Please find attached a patch fixing the default value and type of
> message-make-forward-subject-function.

[...]

>  (defcustom message-make-forward-subject-function
> -  #'message-forward-subject-name-subject
> +  (list #'message-forward-subject-name-subject)
>    "List of functions called to generate subject headers for forwarded
> message

Looks good to me; applied to the trunk.  (I added a :version tag since
the default changed syntactically.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 Sep 2019 17:30:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 37470 <at> debbugs.gnu.org and Damien Cassou <damien <at> cassou.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 Sep 2019 17:30: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. (Sat, 19 Oct 2019 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 243 days ago.

Previous Next


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