emacs-erc
[Top][All Lists]
Advanced

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

Re: Add compat to ERC


From: J.P.
Subject: Re: Add compat to ERC
Date: Fri, 08 Jul 2022 13:55:30 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Philip Kaludercic <philipk@posteo.net> writes:

> I'd be glad to help, I just don't use ERC so I'd need a basic
> configuration to contribute materially.

Cool! Glad you're on board. Believe it or not, ERC thinks it can read
minds and so only offers "ad hoc" connections. (And they wonder why
we've had such a smooth go of things.) Something like this should work
in theory:

  (erc-tls
   :server "testnet.ergo.chat"
   :port 6697
   :nick "testing123"
   :full-name "Testing 123")

Of course, now comes the part where you spend the next day reading
EmacsWiki! (Seriously, though, please let me know if that doesn't work.)

>> diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
>> index 16cfb15a5a..899522f186 100644
>> --- a/lisp/erc/erc-compat.el
>> +++ b/lisp/erc/erc-compat.el
>> @@ -26,6 +26,7 @@
>>  ;; This mostly defines stuff that cannot be worked around easily.
>>  
>>  ;;; Code:
>> +(require 'compat nil 'noerror)
>
> I guess this is the main part.  Have you tested it to see if it works?

Well, tested it in the lazy/naive sense of

1. connected to various servers in the manner shown above

2. installed a fake ELPA package and ran our test suite, which also
   contains some shims for obscure stuff, like gv-place, ert, etc.

>> +(defmacro erc-compat--decoded-time-period (time)
>> +  (declare (indent defun))
>> +  (list (if (< emacs-major-version 28)
>> +            'erc-compat--28-decoded-time-period
>> +          'decoded-time-period)
>> +        time))
>
> If you want, we can upstream these definitions into compat.  I would
> guess others are interested in them too.
>
> My wish would be to one day replace all custom *-compat.el files in the
> core with compat.

That'd be superb. And there's no rush, obviously. Really, though, most
of the stuff in ours is just cruft waiting to die. So, from us, it'd
only be that one you highlighted: `decoded-time-period' from Emacs 28.

Anyway, grateful as always for your help.



reply via email to

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