emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* doing `M-x org-mode' loses point
@ 2006-06-16 14:41 Eduardo Ochs
  2006-06-16 19:17 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Ochs @ 2006-06-16 14:41 UTC (permalink / raw)
  To: emacs-orgmode

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/
    eduardoochs@gmail.com


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-16 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-16 14:41 doing `M-x org-mode' loses point Eduardo Ochs
2006-06-16 19:17 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).