From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: elisp how to insert text at end of each line Date: Wed, 10 Apr 2013 20:39:43 +0300 Message-ID: <878v4ql1y8.fsf@mithlond.arda> References: <1365614909301-283410.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1365615613 24226 80.91.229.3 (10 Apr 2013 17:40:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Apr 2013 17:40:13 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: acomber Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 10 19:40:17 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 1UPz0K-0001va-61 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Apr 2013 19:40:16 +0200 Original-Received: from localhost ([::1]:57496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPz0J-0006Vd-OH for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Apr 2013 13:40:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPz03-0006Px-4Q for Help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 13:40:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPz00-0002ZU-8I for Help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 13:39:59 -0400 Original-Received: from mta-out.inet.fi ([195.156.147.13]:56779 helo=kirsi1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPyzz-0002X8-Ua for Help-gnu-emacs@gnu.org; Wed, 10 Apr 2013 13:39:56 -0400 Original-Received: from mithlond.arda (84.251.134.110) by kirsi1.inet.fi (8.5.140.03) id 5163F40200187FC3; Wed, 10 Apr 2013 20:39:47 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.72) (envelope-from ) id 1UPyzr-0001YA-CU; Wed, 10 Apr 2013 20:39:47 +0300 In-Reply-To: <1365614909301-283410.post@n5.nabble.com> (acomber's message of "Wed, 10 Apr 2013 10:28:29 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.156.147.13 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:90064 Archived-At: --=-=-= Content-Type: text/plain acomber [2013-04-10 10:28:29 -07:00] wrote: > I tried: > > (while (search-forward "\n") > (insert "My text to insert") > ) Try this instead: (while (re-search-forward "$" nil t) (insert "foo") (goto-char (1+ (point)))) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJRZaPgAAoJEHGdadMkU5RQdugQAJCpVQMn1YsLtpYR8luT3CDY Sl30/lVTTCUQfn35mHRdfc6CISVKfl556jYxTqEyLkoTNZdyJR/XAtZPGNaOYs+B aBRjP7eGiJ8l/bNK+08oR2yKn9ITUjADXBKgWqSdG6JPGKFTYItZKR4/t56bBLZY 1sj7IzAB7z3D6zwFqRc5ngo3HRaLACqujKhPn1C5hSfDoN6KGzWi0E9Tsq4a544Q H5AcifT5Wa7hnxv9mzBoXzVGZ3hpkSoPSUyHHmKGCDBslTHEdheNv/9ZsWp0LZUU FGEdKEIg/3Ois88VbDN6dnz/0TfiLinEV9xmgdyZGk4K1881mpxVpOgQkCxLgJp4 rSeKfC4oW72dfp3zbzvR5lUCpINRJeJ1uR+ZIgDKi0kS9yNdi2uTM0JSirmfdzbA eqnYNIhftZ6BWYiWbcIUG002wx385stx29280ICzWKDPbYBXQ5ii12G3wM9xvXN/ zat/Rgy2zN82bU9QJsHntMPE9JY6Kr6X+WsJdX3d1vf9YytKE+1fMSPsHX+4SDhW Xo0JS6K2loS1Y5fQfJfBaOEbtWg0erCQgZJ0drxLVJ4TvKR6DGxjcViXRtBl1izr DNmYmqnFnjKZKhzasLYJcAj4LmJf66LRvE5kn2fjGt1SQfe6OHDLMv5yvfo0VfJC PbEIcMUiL2uIxVTyUVBv =DGOi -----END PGP SIGNATURE----- --=-=-=--