what do you mean it only considers level 1 headlines? It seems to work on
all headlines for me.

The email subject doesn't seem related to the body you can get the level
like this.

(org-element-property :level (org-element-at-point))

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Sat, Apr 8, 2017 at 10:17 AM, Jeremie Juste <jeremieju...@gmail.com>
wrote:

>
> Hello,
>
> Interleave-mode https://github.com/rudolfochrist/interleave, is a very
> convenient tool for writing notes in associated
> with pdf. It uses org-mode for this purpose.
>
> I recently noticed that in the case where I want to write notes for
> multiple pdf in a singlie org file, I have to use the level 1 headline
>
> * Notes for CS103
>   :PROPERTIES:
>   :INTERLEAVE_PDF: cs103.pdf
>   :END:
>
>
> I would like to have the possibility of using any headline level for
> this purpose but my org-fu is weak.
>
> I think it boils down to this function in interleave-mode mode where
> (org-element-type headline) checks only for level 1 headline.
>
>
> #+BEGIN_SRC elisp
> (defun interleave--headline-pdf-path (buffer)
>   "Return the INTERLEAVE_PDF property of the current headline in BUFFER."
> (with-current-buffer buffer
>   (save-excursion
>     (let ((headline (org-element-at-point)))
>       (when (and (equal (org-element-type headline) 'headline)
>                  (org-entry-get nil interleave--pdf-prop))
>         (setq interleave-multi-pdf-notes-file t)
>         (org-entry-get nil interleave--pdf-prop))))))
>
> #+END_SRC
>
>
> Can anyone see a way around it ?
>
> Best regards,
>
> Jeremie
>
>

Reply via email to