From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ihor Radchenko Subject: Re: FW: [RFC] Link-type for attachments, more attach options Date: Fri, 14 Dec 2018 10:16:06 +0800 Message-ID: <87tvjg6eft.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> References: <84y3acss7h.fsf@gmail.com> <875zxe4yro.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87d0r3xllf.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> <87bm6jzw4t.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXd31-0004m3-Ew for emacs-orgmode@gnu.org; Thu, 13 Dec 2018 21:17:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXd2x-0004XI-85 for emacs-orgmode@gnu.org; Thu, 13 Dec 2018 21:17:51 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:43708) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXd2w-0004UX-S6 for emacs-orgmode@gnu.org; Thu, 13 Dec 2018 21:17:47 -0500 Received: by mail-pl1-x62d.google.com with SMTP id gn14so1965487plb.10 for ; Thu, 13 Dec 2018 18:17:46 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Gustav =?utf-8?Q?Wikstr=C3=B6m?= Cc: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > No, it's not there. I know of the custom agendas and use it currently. Bu= t I cannot anywhere specify more than one org-agenda-files parameter, for e= xample.=20 I just tried: #+begin_src emacs-lisp (setq org-agenda-custom-commands (quote (("v" "Test" tags-todo nil ((org-agenda-files '("~/Org/inbox.org")))) ("w" "Test 2" tags-todo nil ((org-agenda-files '("~/Knowledge_base/2016/Private/Get_started_wit= h_org_mode/get_started_org_mode.org"))))))) #+end_src It works fine for me. > 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 whe= re 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 separa= te headlines inside a single emacs-buffer though. It would be cool to be ab= le to do that but my intention was more about introducing the 0-level headl= ine concept. Yeah. But someone needs to volunteer with the patch. It would be even better if these 0-level headings can be edited from the referencing file. Regards, Ihor Gustav Wikstr=C3=B6m writes: > Hi, > >> -----Original Message----- >> From: Ihor Radchenko >> Sent: den 20 november 2018 15:01 >> To: Gustav Wikstr=C3=B6m >> Cc: emacs-orgmode >> Subject: RE: [O] FW: [RFC] Link-type for attachments, more attach options >>=20 >> Hi, >>=20 >> > 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 se= ts >> 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), a= nd >> possibly also an aggregate agenda consisting of other agendas. >>=20 >> 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. Bu= t I cannot anywhere specify more than one org-agenda-files parameter, for e= xample.=20 > >>=20 >> > 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 headi= ngs >> inside one org-mode buffer. Similar to two level-1 headings inside an or= g- >> 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 s= ome >> new conventions regarding syntax and existing properties would have to be >> created as well. >>=20 >> 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. >>=20 >> * Main heading >>=20 >> #+name: org-files-here >> #+begin_src bash >> ls *.org >> #+end_src >>=20 >> #+begin_src emacs-lisp :var files=3Dorg-files-here() :var stars=3D(make= -string >> (car (org-heading-components)) ?*) :results raw replace drawer (let ((f= iles >> (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 whe= re 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 separa= te headlines inside a single emacs-buffer though. It would be cool to be ab= le to do that but my intention was more about introducing the 0-level headl= ine concept. > > Thanks for your idea and suggestion though! > >>=20 >> Best, >> Ihor > > Kind Regards, > Gustav > --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEERZAHPFbUe3JemmzmZHB2Kn2hHYsFAlwTEmYACgkQZHB2Kn2h HYvTvwf/R2aDstwkx5Q4L83WIghiNOq4jecSZi+wDhbbhgzVc4kaPWM/Jji4hNEH J65QH25Z4tnnWzbDe/20kpnTXam1Yw+UKbNeR8e9T3Q590L0whiSuSolfTbr3Gk4 iiMrvN4gMYbVFIkdTm727Gwv9UAQM76GJghgu+91G4cbQSbhZCQmCUtufWEWm3rR mBZNuzEP1edrTdo65BmFBpuhOsyg8UADe/QKye9cDOegj7DCPVIZ43r/88JfzsaB Vodb4ChGgz8GcJwRYO21A4ZAd7AsS0DNFhew/f+R36n8ufnj0NNDwPBUkx13qoyN UTx4qs5LDmmgGICxJ6Dx/kTvJ3eJSA== =N2SL -----END PGP SIGNATURE----- --=-=-=--