[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-orgmode] doing `M-x org-mode' loses point
From: |
Eduardo Ochs |
Subject: |
[Emacs-orgmode] doing `M-x org-mode' loses point |
Date: |
Fri, 16 Jun 2006 11:41:03 -0300 |
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/
address@hidden
(*): We need this: (autoload 'reveal-post-command "reveal"))
- [Emacs-orgmode] doing `M-x org-mode' loses point,
Eduardo Ochs <=