From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bkhl@elektrubadur.se (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) Newsgroups: gmane.emacs.devel Subject: Re: rcirc multiline nick adding Date: Thu, 19 Apr 2007 02:56:16 +0200 Message-ID: <87bqhlgp1r.fsf@bast.dreaming> References: <877is9265r.fsf@kanga.tapsellferrier.co.uk> <873b2xi4rs.fsf@catnip.gol.com> <87647try7q.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176944749 16069 80.91.229.12 (19 Apr 2007 01:05:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2007 01:05:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 19 03:05:42 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HeL5Q-0007o3-WE for ged-emacs-devel@m.gmane.org; Thu, 19 Apr 2007 03:05:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeLAK-0001Qg-3u for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2007 21:10:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeLAG-0001QN-AF for emacs-devel@gnu.org; Wed, 18 Apr 2007 21:10:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeLAF-0001Q7-ES for emacs-devel@gnu.org; Wed, 18 Apr 2007 21:10:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeLAF-0001Q4-Bj for emacs-devel@gnu.org; Wed, 18 Apr 2007 21:10:23 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HeL5L-0004s2-BO for emacs-devel@gnu.org; Wed, 18 Apr 2007 21:05:19 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1HeL54-0004uK-9R for emacs-devel@gnu.org; Thu, 19 Apr 2007 03:05:02 +0200 Original-Received: from nl104-206-203.student.uu.se ([130.243.206.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2007 03:05:02 +0200 Original-Received: from bkhl by nl104-206-203.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Apr 2007 03:05:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: nl104-206-203.student.uu.se Mail-Copies-To: never X-Home-Page: http://bkhl.elektrubadur.se/ User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:w9tPW0X67v2Lc7sUQ08QnpDVaTU= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69602 Archived-At: Nic James Ferrier : > Miles Bader writes: > >> Nic James Ferrier writes: >>> + ;; 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))))) >> >> This seems dangerous; what if it's not a nick? It seems quite likely to >> have annoying results... > > Well... with me it always is a nick. And it's vital that it be put > in. > > Sending multilines through bitlebee without it is tricky. > > Not sure there's another way to tell it if is a nick or not which is > partly why I pasted it here; maybe someone will have an idea. How about instead of doing this automagically, make this a text editing command for multiline mode? I.e. pressing C-c something inserts a nick followed by colon on each line.