GNU bug report logs - #67220
30.0.50; ERC 5.6: Prefer parameter-driven MODE processing in ERC

Previous Next

Package: emacs;

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

Date: Thu, 16 Nov 2023 02:15:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: "J.P." <jp <at> neverwas.me>
To: 67220 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: Re: bug#67220: 30.0.50; ERC 5.6: Prefer parameter-driven MODE
 processing in ERC
Date: Tue, 13 Feb 2024 17:45:32 -0800
[Message part 1 (text/plain, inline)]
This commit

  e69bd59ec59784b2f646e93355d4d63f41426cfc
  
  Honor arbitrary CHANTYPES in ERC
  
  * lisp/erc/erc.el (erc-channel-p): Favor "CHANTYPES" ISUPPORT item
  before falling back to well known prefixes.
  * test/lisp/erc/erc-tests.el (erc-channel-p): Add test.  Arbitrarily
  bundled with bug#60954.

introduced "smarter" handling of CHANTYPES but overlooked a subtlety
regarding how ERC interprets empty vs. missing ISUPPORT values. As
implied in a comment for the function `erc--parse-isupport-value',

  ;; https://tools.ietf.org/html/draft-brocklesby-irc-isupport-03#section-2
  ;;
  ;; > The server SHOULD send "X", not "X="; this is the normalized form.
  ;;
  ;; Note: for now, assume the server will only send non-empty values,

ERC punts on this. Indeed, it's always treated "X=" as having a value
and thus deserving of ("X" . "") in `erc-server-parameters', whereas
it's always seen "X" as more of a flag/switch with no associated value,
hence ("X").

It turns out a not entirely frivolous use case for abiding by that RFC
draft and *not* distinguishing between the two forms has arisen.
Basically, a server may choose to support no channels whatsoever for a
subset of clients, limiting them to direct messages only. To accommodate
this, ERC will need to interpret both "CHANTYPES" and "CHANTYPES=" as
expressing such a policy instead of sticking with its current behavior
of only doing so for the "=" form and treating "CHANTYPES" as equivalent
to ${default/fallback} (and thus also to "-CHANTYPES", which is clearly
wrong).

I think it's worth correcting this in ERC 5.6. Proposed changes
attached. (The first patch is unrelated.)

Thanks.

[0001-5.6-Ignore-the-TGT-LIST-parameter-in-erc-open.patch (text/x-patch, attachment)]
[0002-5.6-Normalize-ISUPPORT-params-with-empty-values-in-E.patch (text/x-patch, attachment)]
[0003-5.6-Use-modern-fallback-for-channel-name-detection-i.patch (text/x-patch, attachment)]

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

Previous Next


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