unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rcirc multiline nick adding
@ 2007-04-18 12:55 Nic James Ferrier
  2007-04-19  0:31 ` Miles Bader
  2007-04-19  2:38 ` Richard Stallman
  0 siblings, 2 replies; 15+ messages in thread
From: Nic James Ferrier @ 2007-04-18 12:55 UTC (permalink / raw)
  To: emacs-devel

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   

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: rcirc multiline nick adding
@ 2007-04-21  3:07 Ryan Yeske
  2007-04-21 18:25 ` Richard Stallman
  0 siblings, 1 reply; 15+ messages in thread
From: Ryan Yeske @ 2007-04-21  3:07 UTC (permalink / raw)
  To: Nic James Ferrier; +Cc: rms, emacs-devel

   Sorry. To be specific:

   the diff works for *my* usage with rcirc - and it is vital for that
   use case. But I use rcirc in quite a restricted way (mostly not
   general irc but for IM systems like jabber via a gateway).

   A couple of suggestions have been made about how I can generalize the
   fix and I'm exploring them.

Nic, you do know that you can do one-to-one chat in rcirc via bitlbee
by opening a query window instead of prefixing the message with the
users nick in the control channel, right?  In that case, multiline
posts to another user works as expected.

Ryan

-- 
http://www.yeske.ca

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-04-23  3:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18 12:55 rcirc multiline nick adding Nic James Ferrier
2007-04-19  0:31 ` 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

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).