emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] FW: [RFC] Link-type for attachments, more attach options


From: Gustav Wikström
Subject: Re: [O] FW: [RFC] Link-type for attachments, more attach options
Date: Sat, 24 Nov 2018 13:56:25 +0000

Hi,

> -----Original Message-----
> From: Ihor Radchenko <address@hidden>
> Sent: den 20 november 2018 15:01
> To: Gustav Wikström <address@hidden>
> Cc: emacs-orgmode <address@hidden>
> Subject: RE: [O] FW: [RFC] Link-type for attachments, more attach options
> 
> Hi,
> 
> >    Generalize org-agenda by allowing us to have multiple ones, and make
> them more general by thinking of them as a set of views that works on sets
> of files. Maybe this is not for all, but I would appreciate to create
> multiple "agendas" (even though I'd call them "libraries" in instead), and
> possibly also an aggregate agenda consisting of other agendas.
> 
> Isn't this already in org? You can use custom agendas with multiple
> "agendas" (custom commands) and set the files they operate on with org-
> agenda-files within custom commands.

No, it's not there. I know of the custom agendas and use it currently. But I 
cannot anywhere specify more than one org-agenda-files parameter, for example. 

> 
> >    If two org-mode files exist in the same folder with different names, it
> would be awesome to think of (and work with) them as two top-level headings
> inside one org-mode buffer. Similar to two level-1 headings inside an org-
> mode file. For this to work all properties we can define for regular
> headings should be possible to define for these "level-0 headings". For
> example an attachment-folder or ID, a deadline, scheduled date, or TODO-
> keyword should in that case be configurable on the whole file. I guess some
> new conventions regarding syntax and existing properties would have to be
> created as well.
> 
> You can do something like below. It is pretty much what you want, except I
> am not sure how to update the headings from local org files. Current org
> version does not allow `:results replace` on raw org output.
> 
> * Main heading
> 
> #+name: org-files-here
> #+begin_src bash
> ls *.org
> #+end_src
> 
> #+begin_src emacs-lisp :var files=org-files-here()  :var stars=(make-string
> (car (org-heading-components)) ?*)  :results raw replace drawer (let ((files
> (mapcar #'car files)))
>   (cl-loop for file in files
>          concat (with-current-buffer (find-file-noselect file)
>                   (concat (format "* %s\n" (buffer-file-name))
>                           (replace-regexp-in-string "^\\*" (concat "*" stars)
> (buffer-string)))))) #+end_src

No, that's not what I want. What I'm talking about is extending org-mode 
conceptually with the concept of 0-level headlines, where the body of that 
"headline" would be everything before the first headline in a file, and where I 
could specify (for example) an attachment-directory and be able to use it with 
this new syntax to link to attached files. I guess I took it a bit far with the 
example of visualizing multiple files from a folder as separate headlines 
inside a single emacs-buffer though. It would be cool to be able to do that but 
my intention was more about introducing the 0-level headline concept.

Thanks for your idea and suggestion though!

> 
> Best,
> Ihor

Kind Regards,
Gustav


reply via email to

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