GNU bug report logs - #56449
29.0.50; Revisit target shortcuts in erc-message

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Fri, 8 Jul 2022 13:27:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 56449 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: 56449 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#56449: 29.0.50; Revisit target shortcuts in erc-message
Date: Tue, 12 Jul 2022 01:10:58 -0700
[Message part 1 (text/plain, inline)]
"J.P." <jp <at> neverwas.me> writes:

> IOW, issuing a
>
>   ERC> /MSG , hi
>
> recalls the last nick to speak over a given connection. And
>
>   ERC> /MSG . hi
>
> reuses the target (channel or query) from the last `erc-message'
> invocation

Actually, thinking on this a bit has revealed that these two state items
(last received vs. last sent) may be less symmetrical than originally
believed in terms of use case and function: the "." form always expands
to a substring of something already typed, IOW "previous input", while
the "," form may well produce something novel.

So, if the dot form is more akin to everyday command-history recall,
then ERC may have an easier time providing a useful substitute by
improving upon its existing offering, namely, erc-ring. Indeed, adopting
in-house variants of the more powerful history-traversing commands seen
elsewhere in Emacs, such as `previous-complete-history-element' and (in
some sense) `previous-matching-history-element', wouldn't be the worst
call (IMO).

> For now, I propose temporarily adopting (1) by confining shared values
> to server buffers.

... and stopping there rather than further complicating the situation
for little perceived gain, convenience wise, by fiddling with imperfect
alternatives to niche features.

As for the comma form, in case the above wasn't clear, I'm in favor of
dialing things back and shelving the notion of enhanced recipient
recall. (In the future, we could conceivably retrieve candidates by
searching backward through text-properties to gather the most recent
speakers in a target buffer. These could be presented via completing
read, perhaps anchored by a transient to offer unified access to various
scopes, like buffer, network, etc.)

For the sake of completeness, I have attached the surviving changes,
minor as they are, and will be adding them or similar to ERC by week's
end unless anyone has additional insights. Thanks.

[0001-Avoid-mutating-default-value-of-erc-server-last-peer.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.