From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org-mode Habit with Varying Description Date: Tue, 28 Oct 2014 17:22:22 +0100 Message-ID: <87y4s0b1vl.fsf@nicolasgoaziou.fr> References: <87ppdmfxre.fsf@enterprise.sectorq.net> <87zjcqz2f2.fsf@ericabrahamsen.net> <87egu1zk8k.fsf@konixwork.incubateur.ens-lyon.fr> <87zjcpfksm.fsf@ericabrahamsen.net> <878uk6nng6.fsf@enterprise.sectorq.net> <87tx2q7rt7.fsf@ericabrahamsen.net> <8738a8coih.fsf@nicolasgoaziou.fr> <87d29ci6fs.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj9Wh-0007py-76 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:21:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj9WY-0002Up-PM for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:21:43 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:58273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj9WY-0002Uk-K5 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:21:34 -0400 In-Reply-To: <87d29ci6fs.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 28 Oct 2014 08:01:59 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Eric Abrahamsen 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. Regards, -- Nicolas Goaziou