From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: elisp how to insert text at end of each line Date: Wed, 10 Apr 2013 20:07:20 +0200 Message-ID: <87d2u28dk7.fsf@web.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365617251 9966 80.91.229.3 (10 Apr 2013 18:07:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Apr 2013 18:07:31 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 10 20:07:35 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UPzQk-0007pO-V3 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Apr 2013 20:07:35 +0200 Original-Received: from localhost ([::1]:42617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPzQk-0002yN-Ge for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Apr 2013 14:07:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPzQa-0002y1-Fs for help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 14:07:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPzQZ-0003cS-4x for help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 14:07:24 -0400 Original-Received: from mout.web.de ([212.227.17.12]:58012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPzQY-0003cB-R1 for help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 14:07:23 -0400 Original-Received: from drachen.dragon ([92.74.136.91]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0LfiZ8-1UxNAo38NW-00pHnb; Wed, 10 Apr 2013 20:07:21 +0200 Mail-Followup-To: help-gnu-emacs@gnu.org, Help-gnu-emacs@gnu.org In-Reply-To: (acomber's message of "Wed, 10 Apr 2013 10:28:29 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V02:K0:bGnie/9pUYj3bXGKM2cc/txmVuX75oxL3176U1SIjYI 0zg/1T5/TkMbhGUll9EtyWSlvV2BuM0ECz6HbM9t7h8jjxm3hv h0EnGAogM0wEC2P1yzKwkXH3tFxXpmC5nfszJfzWVuwihI3eFG KfhEJRAknngm+MpalbCboSve+MMUwOIUA72/WCa4p5SxX+qz40 iaxd7aSA8YReVzBxGC4T2w4pKaEy8UnGZuY9MKbKxQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90066 Archived-At: acomber writes: > I tried: > > (while (search-forward "\n") > (insert "My text to insert") > ) > > and tried using $ symbol. >From LISP: You want `search-forward-regexp'. Or better, use `end-of-line'. Interactively: C-M-% (query-replace-regexp) $ RET some text RET Or indeed, multiple-cursors.el also does things like that very well. Regards, Michael.