emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#68601: 30.0.50; ERC 5.6-git: [patch] Add more erc-message-type o


From: J.P.
Subject: Re: bug#68601: 30.0.50; ERC 5.6-git: [patch] Add more erc-message-type options
Date: Sat, 20 Jan 2024 11:44:33 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Corwin,

Corwin Brust <corwin@bru.st> writes:

> Tags: patch
>
> Hi all,
>
> IME, people have a hard time finding some of the more obscure message
> type "codes" that we sometimes wish to hide (e.g.) using
> `erc-hide-list' and friends.
>
> Each message on IRC is sent along with a numeric code.  Users may wish
> to hide some messages, for example those which are system generated
> based on an action they have expressly taken.  ERC provides several
> features for this, most notably the `erc-hide-list',
> `erc-network-hide-list' and `erc-channel-hist-list' variables. These
> variables use a widget, `erc-message-type', which defines a list of
> common codes.  The patch at the bottom of the message adds several
> options, each with a descriptive tag.   I selected the types to add
> based on my experience helping people adjust their settings, for
> example in conversation on IRC, as well as reviewing the IRC
> documentation collection mentioned in the commit message.

Makes sense to me. I would eventually like to move the entire
`erc-ignore' group and all the lurker business into sub libraries.

> I failed to find related tests to bring along, and have no immediate
> thought to adding some.  Let me know if I should try to make a news
> entry, and your thoughts, as always.  Thanks ever so much for your
> work on ERC.

It would be nice to add tests for ERC's Customize setup, but I don't
know how to do so in a way that won't contaminate the global test
environment. I wonder if the Customize crew could provide some sort of
rubric for going about this.

> In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2024-01-11 built
>  on AVALON
> Repository revision: dc1f18e9d0863a03e00134b36279101f0747fcfb
> Repository branch: master
> Windowing system distributor 'Microsoft Corp.', version 10.0.19045
> System Description: Microsoft Windows 10 Home (v10.0.2009.19045.3992)
>
[...]
>
>> From 4ca17405f75d9e20d1b88086afa39be0128623fb Mon Sep 17 00:00:00 2001
> From: Corwin Brust <corwin@bru.st>
> Date: Fri, 19 Jan 2024 23:07:39 -0600
> Subject: [PATCH] 2024-01-19  Corwin Brust  <corwin@bru.st>
>
> * lisp/erc/erc.el (erc-message-type): add more of the possible
> IRE message types to customize widget for `erc-*hide-list'.
> New options have tags informed by these descriptions:
> https://modern.ircdocs.horse/#numerics

Whoever installs this needs to add "(Bug#68601)" somewhere.

> ---
>  lisp/erc/erc.el | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
> index 767a693a52e..7957462a088 100644
> --- a/lisp/erc/erc.el
> +++ b/lisp/erc/erc.el
> @@ -386,6 +386,16 @@ 'erc-message-type
>            (const "PART")
>            (const "QUIT")
>            (const "MODE")
> +          (const :tag "Away notices (RPL_AWAY 301)" "301")
> +          (const :tag "Self back notice (REP_UNAWAY 305)" "305")
> +          (const :tag "Self away notice (REP_NOWAWAY 306)" "306")
> +          (const :tag "Channel modes on join (RPL_CHANNELMODEIS 324)" "324")
> +          (const :tag "Channel creation time (RPL_CREATIONTIME 329)" "329")
> +          (const :tag "Channel no-topic on join (RPL_NOTOPIC 331)" "331")
> +          (const :tag "Channel topic on join (RPL_TOPIC 332)" "332")
> +          (const :tag "Topic author and time on join
> (RPL_TOPICWHOTIME 333)" "333")

This appears to have been munged in transit:

  Applying: bug#68601: 30.0.50; ERC 5.6-git: [patch] Add more erc-message-type 
options
  error: corrupt patch at line 21
  Patch failed at 0001 bug#68601: 30.0.50; ERC 5.6-git: [patch] Add more 
erc-message-type options
  hint: Use 'git am --show-current-patch=diff' to see the failed patch
  When you have resolved this problem, run "git am --continue".
  If you prefer to skip this patch, run "git am --skip" instead.
  To restore the original branch and stop patching, run "git am --abort".

Or I'm not saving the message properly. In either case, using
git-format-patch(1) and manually attaching the goods may make things
smoother in the future. For this patch, I've just unfolded the one line
by hand.

> +          (const :tag "Invitation success notice (RPL_INVITING 341)" "341")
> +          (const :tag "Channel member names (353 RPL_NAMEREPLY)" "353")
>            (repeat :inline t :tag "Others" (string :tag "IRC Message Type"))))

It'd be great if Customize allowed definitions to easily request that
print forms of values be displayed alongside their :tag, especially in
"value menus."

>
>  (defcustom erc-hide-list nil

I will install this eventually if no one else does.

Thanks,
J.P.

P.S. Any progress on bug#43847 "ERC - prevent yanking multiple lines
into IRC (feature request) *patch*"?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]