From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: changing bookmark entry Date: Mon, 17 Apr 2006 15:35:02 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145288430 2908 80.91.229.2 (17 Apr 2006 15:40:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2006 15:40:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 17 17:40:29 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVVpw-0002u8-H7 for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Apr 2006 17:40:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVVpw-0000r4-09 for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Apr 2006 11:40:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.media.kyoto-u.ac.jp!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!0847253b!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-NNTP-Posting-Host: 4.159.38.177 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread3.news.atl.earthlink.net 1145288102 4.159.38.177 (Mon, 17 Apr 2006 08:35:02 PDT) Original-NNTP-Posting-Date: Mon, 17 Apr 2006 08:35:02 PDT Original-Xref: shelby.stanford.edu gnu.emacs.help:138800 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:34418 Archived-At: "Mike Ballard" wrote in message news:m264l8k637.fsf@west_f1.net... > > In ~/.emacs.bnk I have a bookmark which opens an existing file; the file > is continually being written to by another source. So the line the > bookmark code set to open the file to originally, is now way up near the > top of this growing file whenever I open this bookmark. > > How can I change the ~/.emacs.bmk entry to make it always open this > bookmarked file and position point at the end of the buffer instead? > > Here's the code as it is now: > > (("bookmark title" > ((filename . "") > (front-context-string . " 18:32:29 EDT 20") > (rear-context-string . "t) - Sat Apr 08") > (position . 8154))) > > Maybe you don't need a bookmark then but just a macro that visits that file and moves point to the end. Here's an example: C-x ( C-x C-f d:/mydocu~1/dribdrab M-> C-x ) ;; define kbd macro M-x name-last-kbd-macro dribdrab C-x C-f ;; visit your .emacs move to where you want the macro definition inserted... M-x insert-kbd-macro dribdrab this produces: (fset 'dribdrab [?\C-x ?\C-f ?d ?: ?/ ?m ?y ?d ?o ?c ?u ?~ ?1 ?/ ?d ?r ?i ?b ?d ?r ?a ?b return ?\M->]) Then you can M-x dribdrab or set dribdrab to a key if you want. I set it with defalias: (defalias 'ddb 'dribdrab) for invocation with M-x ddb. Just change the names to protect the innocent on your system. Ed.