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: Tue, 20 Nov 2018 22:00:50 +0800 Message-ID: <87bm6jzw4t.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> 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]:56820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gP6c3-0001PP-C1 for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 09:02:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gP6c0-00048S-Lk for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 09:02:47 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:35228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gP6c0-00047s-E3 for emacs-orgmode@gnu.org; Tue, 20 Nov 2018 09:02:44 -0500 Received: by mail-pf1-x42c.google.com with SMTP id z9so1053118pfi.2 for ; Tue, 20 Nov 2018 06:02:44 -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 Hi, > Generalize org-agenda by allowing us to have multiple ones, and make t= hem more general by thinking of them as a set of views that works on sets o= f files. Maybe this is not for all, but I would appreciate to create multip= le "agendas" (even though I'd call them "libraries" in instead), and possib= ly 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. > If two org-mode files exist in the same folder with different names, i= t would be awesome to think of (and work with) them as two top-level headin= gs 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 head= ings should be possible to define for these "level-0 headings". For example= an attachment-folder or ID, a deadline, scheduled date, or TODO-keyword sh= ould in that case be configurable on the whole file. I guess some new conve= ntions 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=3Dorg-files-here() :var stars=3D(make-st= ring (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 Best, Ihor Gustav Wikstr=C3=B6m writes: > Hi, > >> -----Original Message----- >> From: Ihor Radchenko >> Sent: den 18 november 2018 01:42 >> To: Gustav Wikstr=C3=B6m ; Marco Wahl >> >> Cc: emacs-orgmode >> Subject: RE: [O] FW: [RFC] Link-type for attachments, more attach options >>=20 >> Hi Gustav, >>=20 >> > I like the idea of a function that would symbolically links folders >> > from "ID"-folder structure to a hierarchy-folder structure, based on >> > the name and path of the org-file and its headings containing the >> > links. I probably wouldn't use it much myself though. Not until >> > org-mode starts working better with multiple files, allowing us to >> > more easily define "org-mode libraries". >>=20 >> I am wondering what you mean by "org-mode libraries". Can you explain >> further? > > This goes a bit off topic; But what I mean is mainly two things:=20 > 1) Generalize the org-agenda so that we can have multiple ones > > Generalize org-agenda by allowing us to have multiple ones, and make t= hem more general by thinking of them as a set of views that works on sets o= f files. Maybe this is not for all, but I would appreciate to create multip= le "agendas" (even though I'd call them "libraries" in instead), and possib= ly also an aggregate agenda consisting of other agendas. > > 2) Make files function as virtual "level-0 headings" > > If two org-mode files exist in the same folder with different names, i= t would be awesome to think of (and work with) them as two top-level headin= gs 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 head= ings should be possible to define for these "level-0 headings". For example= an attachment-folder or ID, a deadline, scheduled date, or TODO-keyword sh= ould in that case be configurable on the whole file. I guess some new conve= ntions regarding syntax and existing properties would have to be created as= well. > >>=20 >> Also, another thought about the attachment: links. >> It would be useful to implement links to attachments, which are not in t= he >> current org entry. >> For example, something like "attachment:ORG-ID:file-name", where ORG-ID >> refers to ID of an arbitrary org entry. > > I wouldn't call that attachment-links, but rather ID-based links (since a= ttachments are local based on either headline ID or attach-dir of the curre= nt headline). ID links exist already but link to headlines.=20 > > If you rather see ID-based attachments as some kind of global attachments= for all your org-mode files, I'd think the link-type should reflect that a= nd be called something like "ID-attachment:file-name", "ID-@:file-name", "@= ID:file-name" and be a separate link-type. > >>=20 >> Best, >> Ihor >>=20 >>=20 > > Kind regards > Gustav --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEERZAHPFbUe3JemmzmZHB2Kn2hHYsFAlv0E5IACgkQZHB2Kn2h HYuOuAf+PV/q0OWpCHPIjbZmRf7VwFcYxO19uiZeZ/GKNfW+AerxeeuVpdbuPnzh enoBs22ZZr6XfQA2uiHv20x7IeX5TMN9U8RXr/d7VvlV7akSMdB3OLmlC2PsAQiw yXYeBBlb6nc4/xKoEquW080ZtHMx5VaCQ6+z7GLRAe3AVmfuSAobbA4bB4E4XqQ8 pUdqj0aaGk28bmhmjZ5GLa0AmI43GLWNuD2pzrAp4k4TmbhMt6hW724k/RgJtWZG NAIlptk62h+kYCtAr6dYFb8sDTrTTU2Nhx8P26ttJZkd0LrSJsM6+xMfgAh9CLex kd916W3w4Kaha7fMwXEQoUQWJUrVjg== =ENnI -----END PGP SIGNATURE----- --=-=-=--