all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: eval: (search-forward)
Date: Sun, 10 Oct 2004 14:33:54 +0200	[thread overview]
Message-ID: <uzn2ulpl9.fsf@ID-87814.user.uni-berlin.de> (raw)
In-Reply-To: vw8mzywnjll.fsf@berry.phys.ntnu.no

Albert Reiner <areiner@tph.tuwien.ac.at> writes:

> Hi,
>
> I am working with a file that gets carried around a lot, changes names
> etc., so that I (think I) cannot use bookmarks to mark the place where
> I was working.  So instead I put some mark, e.g., `%%WORK%%' into the
> file at the position where I want to go on working.  Instead of doing
> C-s % % W O R K % % every time I open the document, I wanted to have
> this done automatically.  My attempt was to use the file local
> variables section with an entry
>
>     eval: (search-forward "%%WORK%%")
>
> When I open the file, I am asked whether I want to evaluate the
> `eval', but still I do not end up at the marked position.
>
> Any clarifications on why that does not work, and on how to make it
> work, would be most welcome!

At the time the form is evaluated, the buffer is narrowed to the
local variables section.  That's all there is to it.  Try this:

Local Variables:
eval: (add-hook 'find-file-hook (lambda () (goto-char (point-min))
(search-forward "%%WORK%%")) t t)
End:


    Oliver
-- 
19 Vendémiaire an 213 de la Révolution
Liberté, Egalité, Fraternité!

  reply	other threads:[~2004-10-10 12:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-09 12:48 eval: (search-forward) Albert Reiner
2004-10-10 12:33 ` Oliver Scholz [this message]
2004-10-10 14:48   ` Albert Reiner
2004-10-11  7:59     ` Joakim Hove
2004-10-11 10:16       ` Albert Reiner
2004-10-12 13:57       ` Albert Reiner
2004-10-18  7:02         ` Joakim Hove
2004-10-24 16:11           ` eval: (search-forward) (Solved) Albert Reiner
2004-10-11  9:40     ` eval: (search-forward) Oliver Scholz
2004-10-11 10:09       ` Albert Reiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uzn2ulpl9.fsf@ID-87814.user.uni-berlin.de \
    --to=alkibiades@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.