From: Antoine Levitt <antoine.levitt@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-agenda-switch-to switches to weird place
Date: Tue, 11 Oct 2011 22:24:03 +0200 [thread overview]
Message-ID: <87botnp998.fsf@gmail.com> (raw)
In-Reply-To: 80hb3f5nj4.fsf@somewhere.org
11/10/11 21:35, Sebastien Vauban
>> If I understand correctly, org-agenda-switch-to goes to the org-marker
>> marker that is set by capture.
>
> No, I absolutely don't think so. Org files are plain text files: what you
> don't see in there, is simply not there. So, how could such markers be stored
> in the Org file, when capturing something, and not be visible?
Via markers, see
http://www.chemie.fu-berlin.de/chemnet/use/info/elisp/elisp_29.html. I
don't know much about it either, I just know it exists :-)
> IIUC, the markers are simply some sort of regexp search to find
> certain typical positions:
>
> - org-marker matches the timestamp which is at the origin of the presence of
> the entry in the agenda
>
> - org-hd-marker is the beginning of the heading.
That doesn't seem likely. See this (simplified) code from
org-agenda-switch-to:
(let* ((marker (org-get-at-bol 'org-marker))
(pos (marker-position marker)))
So apparently there is a marker.
> Do you really modify the title more often than the date? You have luck!
> Because of procrastination, I'd say I much, much more often change the date, to
> reprogram the entry at a later date, and so on, and so on.
I change the date directly from the agenda with C-c C-s or S-right. So
when I press RET, it's that I want to edit the title.
>
> Anyway, would you jump onto the beginning of the heading, just where the `***'
> start, I think you can change the line:
>
> (org-get-at-bol 'org-marker))
>
> with:
>
> (org-get-at-bol 'org-hd-marker))
>
> to get another behavior. Now, from that, adding a constant number, or --
> better -- moving forward a couple of times, or -- certainly there are still
> better options -- ... would allow you to land on whichever component of the
> heading.
Right. I can hack something up that'll be specific to my case, I just
wanted to know if there was a proper way to do it that'd benefit everybody.
prev parent reply other threads:[~2011-10-11 20:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 15:57 org-agenda-switch-to switches to weird place Antoine Levitt
2011-10-11 16:45 ` Sebastien Vauban
2011-10-11 17:15 ` Antoine Levitt
2011-10-11 19:35 ` Sebastien Vauban
2011-10-11 20:24 ` Antoine Levitt [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87botnp998.fsf@gmail.com \
--to=antoine.levitt@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 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).