From: Aidan Gauland <aidalgol@no8wireless.co.nz>
To: emacs-devel@gnu.org
Subject: Re: ERC match ACTION patch
Date: Tue, 12 Feb 2013 16:15:44 +1300 [thread overview]
Message-ID: <87ip5ygr33.fsf@dimension8.tehua.net> (raw)
In-Reply-To: 87a9rafz4q.fsf@dimension8.tehua.net
[-- Attachment #1: Type: text/plain, Size: 365 bytes --]
Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> `erc-match-message' truncates the beginning of ACTION messages. This
> should fix it, but I'm not certain that I have not missed any obscure
> edge cases.
Actually, that patch raised an error every time. The conditional in
this one does not, and is simpler (and should still be correct,
obviously).
–Aidan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: erc-match ACTION patch --]
[-- Type: text/x-diff, Size: 639 bytes --]
=== modified file 'lisp/erc/erc-match.el'
--- lisp/erc/erc-match.el 2013-01-02 16:13:04 +0000
+++ lisp/erc/erc-match.el 2013-02-12 03:13:26 +0000
@@ -454,7 +454,14 @@
(match-end 0)))
(message (buffer-substring (if (and nick-end
(<= (+ 2 nick-end) (point-max)))
- (+ 2 nick-end)
+ ;; Message starts 2 characters after
+ ;; the nick except for CTCP ACTION
+ ;; messages. Nick surrounded by angle
+ ;; brackets only in normal messages.
+ (+ nick-end
+ (if (eq ?> (char-after nick-end))
+ 2
+ 1))
(point-min))
(point-max))))
(when (and vector
prev parent reply other threads:[~2013-02-12 3:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 19:05 ERC match ACTION patch Aidan Gauland
2013-02-11 19:07 ` Aidan Gauland
2013-02-12 3:15 ` Aidan Gauland [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip5ygr33.fsf@dimension8.tehua.net \
--to=aidalgol@no8wireless.co.nz \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).