[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing bookmark entry
From: |
B. T. Raven |
Subject: |
Re: changing bookmark entry |
Date: |
Mon, 17 Apr 2006 15:35:02 GMT |
"Mike Ballard" <dont_w@nt_spam.org> 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 . "<path to some file>")
> (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 <ret> M-> C-x ) <ret> ;; define kbd
macro
M-x name-last-kbd-macro <ret> dribdrab
C-x C-f ;; visit your .emacs
move to where you want the macro definition inserted...
M-x insert-kbd-macro <ret> 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.