From: Nic James Ferrier <nferrier@tapsellferrier.co.uk>
To: emacs-devel@gnu.org
Subject: rcirc multiline nick adding
Date: Wed, 18 Apr 2007 13:55:44 +0100 [thread overview]
Message-ID: <877is9265r.fsf@kanga.tapsellferrier.co.uk> (raw)
I was having a problem with multiline not sending proper multiline
messages with bitlbee. This diff fixes it for me... not sure if
anybody else ever had the same problem.
--- /home/nferrier/rcirc.el~ 2007-03-06 10:56:01.000000000 +0000
+++ /home/nferrier/rcirc.el 2007-04-18 13:50:05.000000000 +0100
@@ -1011,6 +1011,12 @@
"Send the text in buffer back to parent buffer."
(interactive)
(assert rcirc-parent-buffer)
+ ;; Is there a nick at the start of the multiline buffer? if so add it to all the lines
+ (goto-char (point-min))
+ (if (looking-at "^[^ :]+: ")
+ (let ((nick (match-string 0)))
+ (while (re-search-forward "\n" nil t)
+ (replace-match (concat "\n" nick)))))
(untabify (point-min) (point-max))
(let ((text (buffer-substring (point-min) (point-max)))
(buffer (current-buffer))
--
Nic Ferrier
http://www.tapsellferrier.co.uk
next reply other threads:[~2007-04-18 12:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 12:55 Nic James Ferrier [this message]
2007-04-19 0:31 ` rcirc multiline nick adding Miles Bader
2007-04-19 0:42 ` Nic James Ferrier
2007-04-19 0:56 ` Björn Lindström
2007-04-19 1:16 ` Nic James Ferrier
2007-04-19 5:19 ` Miles Bader
2007-04-19 2:38 ` Richard Stallman
2007-04-19 8:06 ` Nic James Ferrier
2007-04-19 23:17 ` Richard Stallman
2007-04-19 23:35 ` Nic James Ferrier
-- strict thread matches above, loose matches on Subject: below --
2007-04-21 3:07 Ryan Yeske
2007-04-21 18:25 ` Richard Stallman
2007-04-22 5:23 ` Ryan Yeske
2007-04-22 9:10 ` Nic James Ferrier
2007-04-23 3:47 ` Richard Stallman
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=877is9265r.fsf@kanga.tapsellferrier.co.uk \
--to=nferrier@tapsellferrier.co.uk \
--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).