Gnus development mailing list
 help / color / mirror / Atom feed
* Replies, (very) wide replies, yanking, and the prefix argument
@ 2024-01-19 22:47 Eric Abrahamsen
  2024-01-20  8:28 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2024-01-19 22:47 UTC (permalink / raw)
  To: ding

Someone opened a bug against Gnus today[0], about buggy behavior when
using "S v" (gnus-summary-very-wide-reply) with a prefix argument.

That function looks like this:

(defun gnus-summary-very-wide-reply (&optional yank)
  (interactive (list (and current-prefix-arg
			  (gnus-summary-work-articles 1)))
  (gnus-summary-reply yank t (gnus-summary-work-articles yank)))

Say point is on article number 10682 in the summary buffer, and you run
"C-u S v". The call to the first `gnus-summary-work-articles' in the
interactive form will return (10682), which is assigned to the variable
yank. The second call to `gnus-summary-work-articles' now looks like
`(gnus-summary-work-articles (10682))', which ends up trying to include
the next 10,682 articles in the Summary buffer into the very wide reply.

The whole thing is confusing. A few things seem wrong:

1. The Gnus manual says "S v" runs gnus-summary-wide-reply, but it
actually runs gnus-summary-very-wide-reply

2. The docstring of gnus-summary-very-wide-reply says that it obeys the
process/prefix convention (ie a prefix of '(4) should start a reply to
the next four articles), and *also* says that the prefix argument means
yank the contents of the articles being replied to. The manual only
mentions the process/prefix convention.

3. Then there's the actual bug that the prefix argument is used
incorrectly to generate WIDE-REPLY.

I'm surprised that no one hit this bug before, and I'm not sure what to
do with it. We have "S V" (gnus-summary-very-wide-reply-with-original)
that uses the prefix argument correctly *and* yanks message content
correctly, so I'm not sure there's a need for "S v" to handle the prefix
argument both ways. I suppose I could make it handle the prefix argument
both ways, though.

Let me know if anyone has any thoughts on this.


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

end of thread, other threads:[~2024-01-21  3:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 22:47 Replies, (very) wide replies, yanking, and the prefix argument Eric Abrahamsen
2024-01-20  8:28 ` Michael Albinus
2024-01-21  3:28   ` Eric Abrahamsen

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 NNTP newsgroup(s).