From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: elisp how to insert text at end of each line Date: Thu, 11 Apr 2013 13:32:41 +0200 Message-ID: <87vc7tcnfq.fsf@gmail.com> References: <1365614909301-283410.post@n5.nabble.com> <87obdmxnhd.fsf@gmail.com> <1365675809309-283460.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365679987 28872 80.91.229.3 (11 Apr 2013 11:33:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 11:33:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 13:33:06 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 1UQFkX-0003jy-4U for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 13:33:05 +0200 Original-Received: from localhost ([::1]:45010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFkW-0000By-Ox for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 07:33:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFkK-0000Bt-G9 for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 07:32:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQFkJ-00082r-El for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 07:32:52 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFkJ-00082a-8S for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 07:32:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UQFkG-0003Fn-Es for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 13:32:48 +0200 Original-Received: from e178062155.adsl.alicedsl.de ([85.178.62.155]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Apr 2013 13:32:48 +0200 Original-Received: from tjolitz by e178062155.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Apr 2013 13:32:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178062155.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:IrGMZ1V+cyIgMT0NiIs51XMmK/k= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:90086 Archived-At: acomber writes: > (defun insert-at-end-of-line (text) > "convert word tbl to html tbl" > (interactive) > (goto-char (point-min)) > (while (not (eobp)) > (end-of-line) > (insert text) > (next-line) > ) > ) > > But then in emacs how do I pass the text parameter? Yes, sorry, I used it with (setq text "hello world") in the scratch buffer and forgot to account for user input. -- cheers, Thorsten