From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Org-mode Habit with Varying Description Date: Tue, 28 Oct 2014 09:38:44 -0700 Message-ID: <87oaswgne3.fsf@ericabrahamsen.net> 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> <87y4s0b1vl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj9iV-0000vL-O9 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj9iQ-0006xH-C1 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:33:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:45175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj9iQ-0006x5-6C for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:33:50 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xj9iO-0007wp-2I for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 17:33:48 +0100 Received: from c-76-28-195-250.hsd1.wa.comcast.net ([76.28.195.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 17:33:48 +0100 Received: from eric by c-76-28-195-250.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 17:33:48 +0100 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > 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. 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