emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Bastien <bzg@gnu.org>, Gustavo Barros <gusbrs.2016@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Logbook drawer and org-adapt-indentation with value headline-data [9.4 (9.4-7-g3eccc5-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200921/)]
Date: Tue, 27 Apr 2021 15:04:34 +0800	[thread overview]
Message-ID: <87pmygnr7h.fsf@localhost> (raw)
In-Reply-To: <87v988p6ow.fsf@bzg.fr>

Bastien <bzg@gnu.org> writes:

> This should be fixed with commit 730a05f78.

> ;; FIXME: when storing a note in a LOGBOOK drawer,
> ;; `org-store-log-note' needs to insert a new line before
> ;; the newly inserted note, thus the `type' at point will
> ;; return `paragraph' instead of the expected `drawer', so
> ;; we need to manually detect the drawer.

Maybe you can use

(eq (org-element-type (car (org-element-lineage element))) 'drawer)

A quick test showed that org-element-lineage can detect drawer even when
element is a note inside LOGBOOK drawer.

Best,
Ihor


  reply	other threads:[~2021-04-27  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 19:37 Gustavo Barros
2020-09-21 23:06 ` Nicholas Savage
2020-09-21 23:22   ` Gustavo Barros
2020-12-22 16:20 ` Bastien
2021-04-27  6:44   ` Bastien
2021-04-27  7:04     ` Ihor Radchenko [this message]
2021-04-27  7:29       ` Bastien
2021-04-27 11:08         ` Gustavo Barros

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=87pmygnr7h.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=gusbrs.2016@gmail.com \
    --subject='Re: Bug: Logbook drawer and org-adapt-indentation with value headline-data [9.4 (9.4-7-g3eccc5-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200921/)]' \
    /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

Code repositories for project(s) associated with this 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).