From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Memnon Anon Newsgroups: gmane.emacs.help Subject: Re: conditional text insertion Date: Tue, 19 Jul 2011 14:02:04 +0000 (UTC) Message-ID: <87livu9yg8.fsf@mean.albasani.net> References: <4E25313A.3080405@dogan.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1311087923 32723 80.91.229.12 (19 Jul 2011 15:05:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2011 15:05:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 19 17:05:20 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QjBrH-00081I-Pn for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Jul 2011 17:05:15 +0200 Original-Received: from localhost ([::1]:37731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjBrG-0003Zi-4Q for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Jul 2011 11:05:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjB0c-0004oO-Qu for help-gnu-emacs@gnu.org; Tue, 19 Jul 2011 10:10:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjB0Z-0001N9-Pd for help-gnu-emacs@gnu.org; Tue, 19 Jul 2011 10:10:50 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjB0Z-0001Mv-6u for help-gnu-emacs@gnu.org; Tue, 19 Jul 2011 10:10:47 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QjAsI-0000gn-UC for help-gnu-emacs@gnu.org; Tue, 19 Jul 2011 16:02:14 +0200 Original-Received: from e178209034.adsl.alicedsl.de ([85.178.209.34]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jul 2011 16:02:14 +0200 Original-Received: from gegendosenfleisch by e178209034.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jul 2011 16:02:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e178209034.adsl.alicedsl.de Cancel-Lock: sha1:DPgRzcyM4Tv6tixrmhuWHZW4aQM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.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:81678 Archived-At: Hi Lister, Lister Account writes: > I updated line 3 above because I was getting the error "Wrong Number > of Arguments".  A little googling led me to the solution. Google works of course, but it is *really* faster to get used to emacs self documenting facilities. In this case, I used `C-h f' move-end-of-line: ,---- | move-end-of-line is an interactive compiled Lisp function in | `simple.el'. | | It is bound to C-e, . | | (move-end-of-line ARG) | | For more information check the manuals. | ! Move point to end of current line as displayed. ! With argument ARG not nil or 1, move forward ARG - 1 lines first. | If point reaches the beginning or end of buffer, it stops there. | | To ignore the effects of the `intangible' text or overlay | property, bind `inhibit-point-motion-hooks' to t. | If there is an image in the current line, this function | disregards newlines that are part of the text on which the image | rests. `---- So we need an arg, (move-end-of-line nil) should do. What is the advantage of this approach to google? a) Faster: Its all there, already. I can type `C-h f' faster than my browser starts up. b) Up to date: There is lots of stuff on the net, but believe it or not, emacs changes. The build in documentation is always uptodate, or at least up to the date you are using now. c) See the source: With a single on "in `simple.el', you get the source of the function. If you want to learn elisp, just go and browse ;). Well, there are other benefits, but those seem to me the most potent ones. hth Memnon P.S: (info "(emacs) Help Summary") <--- C-x C-e here is a good starting point.