GNU bug report logs - #68401
30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt

Previous Next

Package: emacs;

Reported by: Emanuel Berg <incal <at> dataswamp.org>

Date: Fri, 12 Jan 2024 10:44:01 UTC

Severity: normal

Tags: patch

Merged with 68395

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "J.P." <jp <at> neverwas.me>
To: 68401 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt
Date: Tue, 23 Jan 2024 17:38:07 -0800
Emanuel Berg <incal <at> dataswamp.org> writes:

> J.P. wrote:
>
>> I don't understand the point of adding your purpose-built
>> predicate `erc--connected-and-joined-p' if you're not going
>> to use it to replace
>>
>>   (lambda () (erc-channel-p (erc-default-target)))
>>
>> completely. IOW, having both is redundant
>

Redundant from the POV of `erc--connected-and-joined-p' because it calls
`erc--current-buffer-joined-p' (which see). Please compare that
function's definition to the lambda. There are overlapping concerns
there. That is, one "subsumes" the other, thus obviating the need for
it.

> ??
>
> (lambda () (erc-channel-p (erc-default-target)))
>
> has been there all along, you then told me to add the
> "logical" connectivity test.
>
> If we can just use the lambda, I'll be happy to drop the test.

You can't just use the lambda, but you can lose it entirely in favor of
your predicate.

>
>> If you're not already doing so, please try expanding your
>> macro use sites to verify correctness.
>
> ???
>
> My "macro use sites" is what?

If you expand one of your `erc-with-all-buffers-of-server' forms with
both the lambda and `erc--connected-and-joined-p' present, it should
become clear why only the latter is needed.




This bug report was last modified 1 year and 80 days ago.

Previous Next


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