GNU bug report logs -
#69597
29.2; ERC 5.6-git: Add a new customizable variable controlling how Erc displays spoilers
Previous Next
Reported by: Fadi Moukayed <smfadi <at> gmail.com>
Date: Wed, 6 Mar 2024 21:48:02 UTC
Severity: wishlist
Tags: patch
Found in version 29.2
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 69597 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Fadi Moukayed <smfadi <at> gmail.com> writes:
> The only issue I noticed after applying the patches, is that the
> following warning is emitted on the *Messages* buffer – (Note that I
> have native compilation enabled):
>
>> ⛔ Warning (comp): erc-button.el:532:4: Warning: the function
>> ‘erc--restore-important-text-props’ is not known to be defined.
>
> I assume this is a compilation order issue? Note that this only
> happens with a clean ELN cache (The following Emacs loads are fine),
> so not sure how significant it is.
Hm, unless I messed something up (definitely possible), that shouldn't
happen . For ERC, I typically remove all the lisp/erc/*.elc files after
every change and before rerunning Make, regardless of whether native
comp is enabled (though removing native-lisp/30.0.50-deadbeef/*.eln
isn't usually necessary, AFAICT). Sometimes, though, I also have to
remove lisp/loaddefs.* and others. In case you weren't aware, there are
recipes for regenerating various autoloads and Custom business in
lisp/Makefile, but I usually just delete all stale assets completely.
>>Happy to explain whatever doesn't make sense
>
> One question regarding "FIXME use a region instead of point-min/max"
> in patch #0002, is there a reason why (region-beginning) /
> (region-end) is indeed not used instead? Just mentioning that because
> IIRC, point-{min,max} is a range over the entire (narrowed) buffer,
> including the (buttonized) nick, message text, possible timestamp (if
> activated) as well. I checked the properties on the whole message line
> while testing and it doesn't seem to have any negative side-effects,
> aside from the fact that it operates on more text than it has to – I
> believe it need only be applied to the message text.
Unfortunately, insertion-hook members lack a means for detecting message
boundaries unequivocally, although they can obviously keep track of
their own modifications and make assertions accordingly. So I agree that
allowing the caller to specify BEG and END in cases where they're
already known makes sense. For example, if they've already scanned for
the end of the speaker name to accomplish some other task or happen to
know the start of the right stamp, it's worth passing that knowledge
along. But computing a sub-region specially, beforehand, just to call
this function is likely less efficient (not that you were suggesting
that). And, of course, accepting BEG/END parameters make it easier to
protect areas of the exposed buffer from props restoration, if ever
there's a need.
>> > From 06e008d1de8a85c9e6b9a5a83f5ec5aefeb446c3 Mon Sep 17 00:00:00 2001
>> > From: "F. Moukayed" <smfadi+emacs <at> gmail.com>
>> > Date: Fri, 8 Mar 2024 08:39:03 +0000
>> > Subject: [PATCH] * lisp/erc/erc-goodies.el: redefine & rework
>> > `erc-spoilers-face' to indicate revealed text
This is news to me, but apparently there's a Git hook that complains
about overlong subject lines. After running git-am(1) to apply your
latest patch, I saw:
Line longer than 78 characters in commit message
Commit aborted; please see the file CONTRIBUTE
So I adjusted the message to conform to this requirement. If the
attached changes look all right to you, then I'll install them (or
something similar) in the coming days.
Thanks,
J.P.
[0000-v1-v2.diff (text/x-patch, attachment)]
[0001-5.6-Fix-misleading-test-in-erc-goodies.patch (text/x-patch, attachment)]
[0002-5.6-Make-important-text-props-more-resilient-in-ERC.patch (text/x-patch, attachment)]
[0003-5.6-Redefine-erc-spoilers-face-to-indicate-revealed-.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.