* bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles
@ 2024-10-29 10:15 Mekeor Melire
2024-10-29 12:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 2+ messages in thread
From: Mekeor Melire @ 2024-10-29 10:15 UTC (permalink / raw)
To: 74083; +Cc: Michael Albinus
The "debbugs" package in GNU Elpa archive buffer-locally overrides the
gnus-posting-styles variable in debbugs-gnu-summary-mode.
Personally, I use gnus-posting-styles to configure conditions for when
which email-address should be used. E.g. I want debbugs.el to always
use the email-address from which I'm now sending this email. But
debbugs.el won't obey my configuration in gnus-posting-styles.
Let's take a look at the relevant code in debbugs-gnu.el:
(define-minor-mode debbugs-gnu-summary-mode
...
(set (make-local-variable gnus-posting-styles)
...))
(In particular, the second "..." is not an expression that involves the
global default value of gnus-posting-styles.)
Here's how I personally work around this bug:
(defun debbugs-gnu-summary-append-default-gnus-posting-styles ()
(when (local-variable-p 'gnus-posting-styles)
(setq-local gnus-posting-styles
(append gnus-posting-styles
(default-value 'gnus-posting-styles)))))
(add-hook 'debbugs-gnu-summary-mode-hook
#'debbugs-gnu-summary-append-default-gnus-posting-styles)
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles
2024-10-29 10:15 bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles Mekeor Melire
@ 2024-10-29 12:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-29 12:45 UTC (permalink / raw)
To: Mekeor Melire; +Cc: 74083
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Mekeor Melire <mekeor@posteo.de> writes:
Hi Mekeor,
> The "debbugs" package in GNU Elpa archive buffer-locally overrides the
> gnus-posting-styles variable in debbugs-gnu-summary-mode.
>
> Personally, I use gnus-posting-styles to configure conditions for when
> which email-address should be used. E.g. I want debbugs.el to always
> use the email-address from which I'm now sending this email. But
> debbugs.el won't obey my configuration in gnus-posting-styles.
Well, this was made by intention in order to keep the posting-styles
defined in debbugs-gnu-summary-mode. Could you, pls try the appended
patch? It introduces a new user option
debbugs-gnu-summary-keep-posting-styles. When set to t, your personal
posting-styles shall be kept.
Best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1126 bytes --]
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index b5f07ad3cd..85c891a483 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1897,6 +1897,11 @@ MERGED is the list of bugs merged with this one."
:version "29.1"
:type 'regexp)
+(defcustom debbugs-gnu-summary-keep-posting-styles nil
+ "Whether to keep the user's `gnus-posting-styles'."
+ :version "30.1"
+ :type 'boolean)
+
(defvar debbugs-gnu-summary-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "C" #'debbugs-gnu-send-control-message)
@@ -1910,7 +1915,11 @@ MERGED is the list of bugs merged with this one."
\\{debbugs-gnu-summary-mode-map}"
:lighter " Debbugs" :keymap debbugs-gnu-summary-mode-map
(set (make-local-variable 'gnus-posting-styles)
- `((".*"
+ `(;; We apply them first, because we want to keep our own
+ ;; posting-styles prior the others.
+ ,@(and debbugs-gnu-summary-keep-posting-styles
+ (default-value 'gnus-posting-styles))
+ (".*"
(eval
(when (buffer-live-p gnus-article-copy)
(with-current-buffer gnus-article-copy
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-29 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-29 10:15 bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles Mekeor Melire
2024-10-29 12:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).