emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] save-excursion fails to restore point


From: Carsten Dominik
Subject: Re: [Orgmode] save-excursion fails to restore point
Date: Wed, 10 Jun 2009 09:03:22 +0200


On Jun 9, 2009, at 10:56 PM, Samuel Wales wrote:

Here is a minimal test case:

(save-excursion
 (outline-up-heading 1 'invisible-ok)
 (org-sort-entries-or-items nil ?a))

What happens is that point stays on the parent headline.

What I expect is for save-excursion to save point no
differently from just saving point and doing goto-char.

Also:

When I change a todo state and then sort entries manually
using my sort function, everything works.  But when I do so
from org-after-todo-state-change-hook, point gets placed on
the parent headline.  Point gets changed right after the
save-excursion in org-todo (3rd paren from last).

Reproducible?

RMS in the reply to
http://www.archivum.info/address@hidden/2006-01/msg00053.html
seems to say that it is inevitable.

I think it is in fact unavoidable when you delete and re-insert
text that contained a marker.  Not impossible to fix, or does
in fact do if for clock history markers, but for the sorting routine
that would really be too much to ask.

- Carsten



Is there a way for org to work around this?

If not, it is a warning to the wise.

-- Myalgic encephalomyelitis denialism is causing death and severe suffering, worse than MS. Conflicts of interest are destroying research. / You/ can get the disease at any time permanently. Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]