emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: Org-mode Habit with Varying Description
Date: Tue, 28 Oct 2014 08:01:59 -0700	[thread overview]
Message-ID: <87d29ci6fs.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 8738a8coih.fsf@nicolasgoaziou.fr

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Right now it looks like the central "cond" statement in
>> `org-add-log-setup' is as close as we've got to a canonical definition
>> of where a heading's log list is to be found. Should I just write my own
>> version of this, or would you be open to refactoring `org-add-log-setup'
>> so the "finding" part is a separate function that can be reused
>> elsewhere?
>
> Done, as `org-log-beginning'. Note that it will return a non-nil value
> even if there is no log list in the entry.

I was just fooling with this a bit, and am noticing some odd (to me)
behavior. If I start with emacs -Q, then (goto-char (org-log-beginning))
takes me to the start of a :LOGBOOK: drawer, and (org-element-at-point)
returns the drawer. That works no matter whether the log drawer is
folded or not. But if the headline is folded, (org-element-at-point)
returns the headline.

Starting emacs with my usual customizations, it's even weirder than
that. If I start with the subtree visible but the log drawer folded,
then this (starting with point in the middle of the headline):

(progn
  (goto-char (org-log-beginning))
  (org-element-at-point))

Gives me paragraph. But eval'ing the two lines above consecutively (without
the progn), gives me the drawer. If the logbook drawer is unfolded, I
get paragraph every time.

Anyway, I don't know what the expected behavior is, and I don't know how
outline visibility is supposed to impact document parsing. But this
seems strange...

All I've customized is:

(setq org-log-into-drawer t)

Thanks,
eric

  parent reply	other threads:[~2014-10-28 14:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 14:33 Org-mode Habit with Varying Description Daya Atapattu
2014-10-20 14:52 ` Bastien
2014-10-20 15:46   ` Daya Atapattu
2014-10-20 16:02 ` Jorge A. Alfaro-Murillo
2014-10-20 17:37 ` Pete Ley
2014-10-21  0:34   ` Eric Abrahamsen
2014-10-21 12:21     ` Samuel Loury
2014-10-21 16:29       ` Eric Abrahamsen
2014-10-24  3:42         ` Pete Ley
2014-10-26 15:51           ` Eric Abrahamsen
2014-10-28 13:28             ` Nicolas Goaziou
2014-10-28 13:41               ` Eric Abrahamsen
2014-10-28 15:01               ` Eric Abrahamsen [this message]
2014-10-28 16:22                 ` Nicolas Goaziou
2014-10-28 16:38                   ` Eric Abrahamsen
2014-10-29 20:48                     ` Nicolas Goaziou
2014-10-20 19:13 ` Melleus
2014-10-20 20:03 ` Brady Trainor
2014-10-21 15:37 ` Michael Brand

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=87d29ci6fs.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).