emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attachments and inheritance (bug?)


From: flare
Subject: Re: attachments and inheritance (bug?)
Date: Sun, 06 Sep 2020 01:52:36 -0700
User-agent: mu4e 1.4.5; emacs 26.3

I have run into this issue myself, my solution for this ended up being
a quick hack to toggle this inheritence so that subheadings could reach
into superheadings when referencing the same attachments.

#+BEGIN_SRC elisp

(defun org-attach-switch-inheritence ()
  "Allows for Subtrees to have their own distinct attach directories"
  (interactive)

  (if (member "ID" org-use-property-inheritance)
      (progn
        (setq org-use-property-inheritance
          (delete "ID" org-use-property-inheritance)
          )
        (message "ID Inheritance Disabled")
        )
    (add-to-list 'org-use-property-inheritance "ID")
    (message "ID Inheritance Enabled")
    )
  )

;; keybinding for C-c C-A
(local-set-key [3 33554433] 'org-attach-switch-inheritence)

#+END_SRC

Bastien writes:

> Hi Julius,
>
> Dittmar <Julius.Dittmar@gmx.de> writes:
>
>> Hello friends,
>>
>> either I misunderstood something or I stumbled upon a bug.
>>
>> Situation: I have a heading with some files attached. This heading has
>> an ID property, upon which the directory for those files is based.
>>
>> There's also a subheading with no ID. Inside of that subheading I'd like
>> to link to one of the attached files. But although
>> org-attach-use-inheritance is non-nil, the attachment is not found from
>> inside that subheading.
>>
>> Shouldn't it be found?
>
> I tried your example and the file is found for both links.
>
> What is the exact value of `org-attach-use-inheritance' (t or 'selective)?
>
> If 'selective, what is the value of `org-use-property-inheritance'?
>
>> - GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.10.9) of
>> 2018-07-06
>> - org-mode: current master
>> - no setting containing 'attach' in any configuration file
>
> Can you provide a reproducible recipe with a minimal configuration?
>
> Thanks,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]