all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66330: 28.2; Gnus wide reply (S W) changes Subject header when used from Debbugs thread
@ 2023-10-04  0:26 Maxim Cournoyer
  2023-10-04  7:29 ` Eli Zaretskii
  2023-10-04 12:10 ` Michael Albinus
  0 siblings, 2 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2023-10-04  0:26 UTC (permalink / raw)
  To: 66330; +Cc: Bruno Victal

Hi,

When attempting to reply from an Emacs Debbugs thread specific email,
the Subject line gets set to the subject of the first email in the
thread rather than to that of the specific email I'm replying to, which
looses context.

Example/reproducer:

$ guix shell --container emacs-no-x emacs-debbugs -- emacs

From the launched Emacs:

1. M-x debbugs-gnu-bugs 65479

2. Press 'a' to load the bug despite the lack of SSL certificates.

3. Navigate to the message titled:
[bug#65479] [PATCH core-updates 02/61] gnu: Add docbook-xml-5.

4. Press S W to send a wide reply.

5. Observe that the Subject header in the email response being edited
has been changed to "Re: bug#65479: [PATCH core-updates 00/61] The
Draining of the XML & DocBook Swamp.", that is, the original subject of
the "bug" (its first message).

I haven't been able to explain what causes that, but I've found where it
occurs.  Following the original 'gnus-article-wide-reply-with-original'
call, it eventually calls to 'message-setup-1', and the Subject
modification happens by unknown code (hooks?) just before the line 6870
("(run-hooks 'message-setup-hook)") runs:

--8<---------------cut here---------------start------------->8---
(defun message-setup-1 (headers &optional yank-action actions return-action)
  (dolist (action actions)
    (condition-case nil
        ;; FIXME: Use functions rather than expressions!
	(add-to-list 'message-send-actions
		     `(apply #',(car action) ',(cdr action)))))
  (setq message-return-action return-action)
  
[...]

  (run-hooks 'message-signature-setup-hook)
  (message-insert-signature)
  (save-restriction
    (message-narrow-to-headers)
    (run-hooks 'message-header-setup-hook))
  (setq buffer-undo-list nil)
  (when message-generate-hashcash
    ;; Generate hashcash headers for recipients already known
    (mail-add-payment-async))

===> Subject header changed HERE

  ;; Gnus posting styles are applied via buffer-local `message-setup-hook'
  ;; values.
  (run-hooks 'message-setup-hook)
  ;; Do this last to give it precedence over posting styles, etc.
  (when (message-mail-p)
    (save-restriction
      (message-narrow-to-headers)
      (if message-alternative-emails
	  (message-use-alternative-email-as-from))))
  (message-position-point)
  ;; Allow correct handling of `message-checksum' in `message-yank-original':
  (set-buffer-modified-p nil)
  (undo-boundary)
  ;; rmail-start-mail expects message-mail to return t (Bug#9392)
  t)
--8<---------------cut here---------------end--------------->8---

Would someone be able to explain what is responsible for this?  It seems
to me it'd be preferable if the subject of the message I'm replying to
was kept rather than replaced this way, to preserve context.

-- 
Thanks,
Maxim





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

end of thread, other threads:[~2023-10-06  6:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04  0:26 bug#66330: 28.2; Gnus wide reply (S W) changes Subject header when used from Debbugs thread Maxim Cournoyer
2023-10-04  7:29 ` Eli Zaretskii
2023-10-04  7:53   ` Michael Albinus
2023-10-04  8:31     ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-04  8:45       ` Eli Zaretskii
2023-10-04  9:11         ` Michael Albinus
2023-10-04 16:33           ` Eli Zaretskii
2023-10-06  6:48           ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-04  9:29       ` Michael Albinus
2023-10-04 14:58     ` Maxim Cournoyer
2023-10-04 12:10 ` Michael Albinus
2023-10-04 20:12   ` Maxim Cournoyer
2023-10-05  7:53     ` Michael Albinus
2023-10-05 13:00       ` Maxim Cournoyer

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.