emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Johan Tolö" <johan@toloe.se>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-attach-use-inheritance inherits from sibling
Date: Sun, 03 Oct 2021 15:28:34 +0200	[thread overview]
Message-ID: <87zgrqqlcs.fsf@toloe.se> (raw)
In-Reply-To: <87v92gde01.fsf@localhost>


Ihor Radchenko <yantar92@gmail.com> writes:
> I cannot reproduce on current main. Are you still seeing this 
> problem?

Yes I believe I am. Also, it does not seem to be an org-attach 
issue but rather an issue with how org gets properties with 
inheritance.

If "* Top heading" is the first heading in the buffer with nothing 
above it, not even a whitespace/newline, then '(org-entry-get nil 
"id" t)' with point in "* Second heading" will return the id of 
"Top heading". If there is anything before "Top heading" then 
'nil' will be returned.

This happens when I run 'emacs -Q' from within the "lisp" 
directory of a newly cloned "org-mode" main branch.

This example illustrates the problem:

---- beginning of buffer ----
* Top heading
:PROPERTIES:
:ID:       acf18561-7a84-4703-96c6-1aceccd46b33
:END:

* Second heading
  
#+begin_src emacs-lisp
  (load "org.el")
  (load "org-id.el")
  (org-entry-get nil "id" t)
#+end_src

#+RESULTS:
: acf18561-7a84-4703-96c6-1aceccd46b33

---- end of buffer ----


-- 
Johan Tolö


  reply	other threads:[~2021-10-03 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06  9:22 org-attach-use-inheritance inherits from sibling Johan Tolö
2021-10-01 14:19 ` Ihor Radchenko
2021-10-03 13:28   ` Johan Tolö [this message]
2021-10-03 14:40     ` [PATCH] " Ihor Radchenko
2022-01-15 11:52       ` Ihor Radchenko

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=87zgrqqlcs.fsf@toloe.se \
    --to=johan@toloe.se \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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).