emacs-erc
[Top][All Lists]
Advanced

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

Multi-target buffers


From: J.P.
Subject: Multi-target buffers
Date: Sun, 05 Nov 2023 19:11:45 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Some clients are capable of displaying messages for multiple targets in
a single buffer. I see two basic approaches to achieving this in ERC.

The first involves making our buffer-vs-target model more "polymorphic"
so it can accommodate both one-to-one and one-to-many relations. All
things being equal, this would be my preference. However, much work
would be needed to ensure existing infrastructure can detect when a
context is "multi-target" and tailor operations accordingly.

The second approach comes down to devising some kind of hack to
approximate the effect. It would likely involve a separate "ERC
adjacent" major mode that replicates certain conveniences available in
actual target buffers. A POC for doing this via the match-log facility
is attached. This particular implementation papers over a host of
familiar problems, such as the age old configuration-granularity
conundrum. To try it out, apply the attached patch, and do:

  (require 'erc-match)
  (setopt erc-log-matches-flag t
          erc-log-match-format erc-match-marquee-log-format-flush-string
          erc-keyword-highlight-type nil
          erc-keywords '("."))
  (erc :server "localhost")

This will route all messages to an enhanced match-log buffer that
supports limited interactivity. You can <TAB> around between buttons and
cycle targets with C-c C-n/C-p. <TAB> completion at the prompt for the
selected target also works.

Unfortunately, seeing your own messages currently requires the patch set
from #49860. If going that way, don't forget to add `v3' to
`erc-modules' before connecting.

If anyone out there wants something like this eventually, please open a
feature request with M-x erc-bug RET and add the pseudo header
"Severity: wishlist".

Thanks.

Screenshot: 
https://debbugs.gnu.org/cgi/bugreport.cgi?msg=160;att=1;filename=erc-multi-target-match-hack.png;bug=60936

Attachment: 0001-POC-Give-erc-match-log-its-own-major-mode.patch
Description: Text Data


reply via email to

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