Hello list,

Suppose that I have a file with a structure like this:

* an org header
  (some elisp code)

* another org header
  (more elisp code)

* another org header
  (more elisp code)

In a file like that it would be natural to switch between org-mode and
emacs-lisp-mode; M-x emacs-lisp-mode works as expected, but when I do
M-x org-mode the point moves to the first header line, and that
doesn't look like the right thing...

One solution that just occurred to me is to have a line like this in
each elisp block:

 ;; (progn (save-excursion (org-mode)) (reveal-post-command))

by executing it with C-x C-e (*) I can switch back to org-mode without
losing point... the next obvious steps - binding that to a key,
patching org-mode, etc, are not relevant here, so I won't talk about
them...

So, is this org-mode-jumps-to-the-first-header-line a bug or a
feature? Is there a standard workaround?

 Thanks in advance, cheers,
   Eduardo Ochs
   http://angg.twu.net/
   [EMAIL PROTECTED]


(*): We need this: (autoload 'reveal-post-command "reveal"))


_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to