emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: David Talmage <david.talmage@shoutpoint.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: transcluding some org-elements in multiple places
Date: Wed, 14 Dec 2016 11:55:44 -0500	[thread overview]
Message-ID: <m2shpqo3fz.fsf@Johns-MacBook-Air.local> (raw)
In-Reply-To: <CAM6q_N7fnyK1MiU47ifwtN5xGtuBgVCdxGu_S30LFesMgzZ56w@mail.gmail.com>


David Talmage writes:

> On Fri, Dec 9, 2016 at 11:28 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
>> On Friday,  9 Dec 2016 at 15:29, John Kitchin wrote:
>> > Hi all,
>> >
>> > I have an idea for how I could transclude "copies" or links to
>>
>> [...]
>>
>> > Any thoughts? Do you see any potential issues?
>>
>> Potentially very interesting and useful idea.  Some thoughts/issues:
>>
>>
> I'm interested in this, too.  In my lab notebook org file, I have a section
> that should be put into its own file and either linked or transcluded in
> several places.  Transclusion would be better because I could see the text
> without following a link.  It suits my lazy nature. ;-)

It turns out to be pretty easy to see the text; that can be done with a
simple overlay. What is not easy, is to be able to edit the text, or use
the text with org-machinery, e.g. org-map-entries. The text in the
overlay is not visible to the org-machinery, so you can not get
properties, edit it, etc... Editing could be made possible with a
special buffer, but it doesn't seem likely that you can make the overlay
display work with many org-functions.

I did have some success making bi-directional editing possible with
modification-hooks on an overlay on the copied text, but it is tricky to
do and I ran into some other difficulties I have not been able to get past.

1. having a transcluded headline at a different level than the source.
E.g. I want to group headlines under a heading in one document, but they
are all first level headings in another document.

2. having an org-id in more than one location confuses org-id and causes
some issues. This suggests you might want some kind of transcluded id,
that is different than the source id.

>
>
>> ...
>>
>> - what about more than level of indirection: link to a trancluded
>>   headline which transcludes to another etc.  What is shown?  Is there a
>>   performance hit?
>>
>>
> It seems to me that transclusion should be transitive.  A transcluded org
> file should be able to transclude other org files.  It should be
> transclusion all the way down.
>
> It also seems to me that org-mode transclusion must detect cycles so that
> it does not infinitely transclude documents.

that would be a good idea!

>
> - what happens if the destination moves or gets deleted?  the link to
>>   it, which looked like something "complete" is now meaningless.  This
>>   could be quite confusing.  This is probably the most serious issue.
>>
>
> How does org-mode handle broken links now?  That's probably the right way
> to handle broken transclusion.
>
>
>
>> - the table aspect is almost a "view" on a database which is really
>>   appealing but would benefit from a fully defined syntax a la sql?
>>   Would table formulas work as expected from the view of the contents?
>>
>>
> Why wouldn't table formulas work?  Transclusion is/could be/should be just
> another way to put org-mode formatted text into an org-mode buffer.
>
> ...
>>
>> - could we have "read-only" views?  I may not want the original touched.
>>
>
> Perhaps that would be property of the transcluded document.
>
>
>
>> - how does an export work?  On the view or the actual contents?
>>
>>
> Export works on the view.


-- 
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

  reply	other threads:[~2016-12-14 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3d4bfe3d30ae4c5a8be905fa6b15f350@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-09 16:28 ` transcluding some org-elements in multiple places Eric S Fraga
2016-12-14 15:55   ` David Talmage
2016-12-14 16:55     ` John Kitchin [this message]
2017-01-05 13:26       ` Matt Price
2017-01-05 16:37         ` John Kitchin
     [not found]           ` <CAN_Dec8C386-+mNODfrXZkMpoRt30xEUkjSMCZDOhpi-ydRDeg@mail.gmail.com>
     [not found]             ` <m2zij5qbci.fsf@Johns-MacBook-Air.local>
2017-01-06  2:17               ` Matt Price
2017-01-06  2:19                 ` John Kitchin
2017-01-06 14:30                   ` Matt Price
2016-12-09 15:29 John Kitchin
2016-12-16  0:26 ` Matt Price
2016-12-16 16:51   ` Matt Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2shpqo3fz.fsf@Johns-MacBook-Air.local \
    --to=jkitchin@andrew.cmu.edu \
    --cc=david.talmage@shoutpoint.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).