all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 66330@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: bug#66330: 28.2; Gnus wide reply (S W) changes Subject header when used from Debbugs thread
Date: Tue, 03 Oct 2023 20:26:26 -0400	[thread overview]
Message-ID: <87v8bn6xn1.fsf@gmail.com> (raw)

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





             reply	other threads:[~2023-10-04  0:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04  0:26 Maxim Cournoyer [this message]
2023-10-04  7:29 ` bug#66330: 28.2; Gnus wide reply (S W) changes Subject header when used from Debbugs thread 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8bn6xn1.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=66330@debbugs.gnu.org \
    --cc=mirai@makinata.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.