[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Org-mode Habit with Varying Description
From: |
Eric Abrahamsen |
Subject: |
Re: [O] Org-mode Habit with Varying Description |
Date: |
Tue, 28 Oct 2014 09:38:44 -0700 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Eric Abrahamsen <address@hidden> writes:
>
>> 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)
>
> This is unrelated to `org-log-beginning'. Point cannot be left in an
> invisible area. E.g., the same applies to
>
> (forward-line 2) (point)
>
> vs
>
> (progn (forward-line 2) (point))
>
> Anyway, that's a red herring.
Okay, thanks. Since this is part of a function, I guess I should assume
the (progn... behavior above, assume `org-element-at-point' is going to
return a paragraph, and then work up from there to see if I'm in a
log-list. Is that right?
Eric
- Re: [O] Org-mode Habit with Varying Description, (continued)
- Re: [O] Org-mode Habit with Varying Description, Pete Ley, 2014/10/20
- Re: [O] Org-mode Habit with Varying Description, Eric Abrahamsen, 2014/10/20
- Re: [O] Org-mode Habit with Varying Description, Samuel Loury, 2014/10/21
- Re: [O] Org-mode Habit with Varying Description, Eric Abrahamsen, 2014/10/21
- Re: [O] Org-mode Habit with Varying Description, Pete Ley, 2014/10/23
- Re: [O] Org-mode Habit with Varying Description, Eric Abrahamsen, 2014/10/26
- Re: [O] Org-mode Habit with Varying Description, Nicolas Goaziou, 2014/10/28
- Re: [O] Org-mode Habit with Varying Description, Eric Abrahamsen, 2014/10/28
- Re: [O] Org-mode Habit with Varying Description, Eric Abrahamsen, 2014/10/28
- Re: [O] Org-mode Habit with Varying Description, Nicolas Goaziou, 2014/10/28
- Re: [O] Org-mode Habit with Varying Description,
Eric Abrahamsen <=
- Re: [O] Org-mode Habit with Varying Description, Nicolas Goaziou, 2014/10/29
Re: [O] Org-mode Habit with Varying Description, Melleus, 2014/10/20
Re: [O] Org-mode Habit with Varying Description, Brady Trainor, 2014/10/20
Re: [O] Org-mode Habit with Varying Description, Michael Brand, 2014/10/21