all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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; 5+ 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] 5+ 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
  2024-11-06 15:03   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ 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] 5+ messages in thread

* bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles
  2024-10-29 12:45 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-06 15:03   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-11-11 21:56     ` Mekeor Melire
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-06 15:03 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: 74083-done

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Mekeor,

> Could you, pls try the appended patch?

No response for a week. So I've pushed the patch to the repository. Will
appear with next debbugs version on GNU ELPA (0.42).

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles
  2024-11-06 15:03   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-11 21:56     ` Mekeor Melire
  2024-11-12  8:03       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Mekeor Melire @ 2024-11-11 21:56 UTC (permalink / raw)
  To: 74083; +Cc: Michael Albinus

2024-11-06 16:03 michael.albinus@gmx.de:

> > Could you, pls try the appended patch?
>
> No response for a week. So I've pushed the patch to the
> repository. Will appear with next debbugs version on GNU ELPA (0.42).

Sorry, I did actually try your patch within that week but somehow must
have failed to properly send an email reporting that it worked
well. Thanks for your efforts.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#74083: 30.0.91; GNU Elpa "debbugs" package ignores gnus-posting-styles
  2024-11-11 21:56     ` Mekeor Melire
@ 2024-11-12  8:03       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-12  8:03 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: 74083

Mekeor Melire <mekeor@posteo.de> writes:

Hi Meteor,

> Sorry, I did actually try your patch within that week but somehow must
> have failed to properly send an email reporting that it worked
> well. Thanks for your efforts.

Meanwhile, there is Debbugs 0.42 on GNU ELPA. It contains that patch.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-12  8:03 UTC | newest]

Thread overview: 5+ 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
2024-11-06 15:03   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-11 21:56     ` Mekeor Melire
2024-11-12  8:03       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.