emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can I "multi-include" a subtree?
@ 2020-05-02 20:09 David Rogers
  2020-05-02 20:57 ` Samuel Wales
  0 siblings, 1 reply; 5+ messages in thread
From: David Rogers @ 2020-05-02 20:09 UTC (permalink / raw)
  To: emacs-orgmode

Is there a method I can use to include the same subtree in several different files, such that editing one instance of that subtree updates the others automatically? I'm hoping to be able to view the full version of the subtree in each of the files, without having to follow a link; if what I'm describing isn't really possible, then I'll just use links in the other files to point to the original subtree, which I know how to do. I'm just exploring the sometimes-unexpected possibilities. :)

-- 
Thanks
David


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I "multi-include" a subtree?
  2020-05-02 20:09 Can I "multi-include" a subtree? David Rogers
@ 2020-05-02 20:57 ` Samuel Wales
  2020-05-02 21:00   ` Samuel Wales
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Samuel Wales @ 2020-05-02 20:57 UTC (permalink / raw)
  To: David Rogers; +Cc: emacs-orgmode

stating the obvious: org typically stores a forest [files] of trees of
nodes.  some things you want to put into it are best expressed more
generally than with trees.  i call it [boring name] the tree problem.

there are a bunch of existing sort-of solutions, but to me the best is
linking [as you mentioned], using org-id.  although that only links to
entries, and it requires following links.  one entry becomes
canonical.  you have to set metadata for the linking node.

there are solutions not implemented that could be better that have
been talked about on the mailng list, but they still have the issues
of following links or other issues.

duplication is out the window because dry.

what you seem to want seems to require a feature in emacs in which you
have virtual includable regions.  this can be done to a large degree
at the buffer level, but not at the region level.

that would open up some interesting possibilities, maybe including
inline multi-mode stuff.  and it would fix your problem.  you could
maybe color the one that is in the file itself differently, or keep
all looking equal status to the user.

i think there has been discussion on the mailing list and probalby on
emacs-devel recently about an idea similar to this.  it migth be teh
same as what you want.  not sure.

it goes by a different name.  smoevbody will chime in i hope.

On 5/2/20, David Rogers <davidandrewrogers@gmail.com> wrote:
> Is there a method I can use to include the same subtree in several different
> files, such that editing one instance of that subtree updates the others
> automatically? I'm hoping to be able to view the full version of the subtree
> in each of the files, without having to follow a link; if what I'm
> describing isn't really possible, then I'll just use links in the other
> files to point to the original subtree, which I know how to do. I'm just
> exploring the sometimes-unexpected possibilities. :)
>
> --
> Thanks
> David
>
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I "multi-include" a subtree?
  2020-05-02 20:57 ` Samuel Wales
@ 2020-05-02 21:00   ` Samuel Wales
  2020-05-02 21:19   ` David Rogers
  2020-05-02 22:44   ` Samuel Wales
  2 siblings, 0 replies; 5+ messages in thread
From: Samuel Wales @ 2020-05-02 21:00 UTC (permalink / raw)
  To: David Rogers; +Cc: emacs-orgmode

p.s. presumably the agenda would in some cases want to distinguish
canonical [in the place whwere ther data will be saved] from
non-canonical.

also presumably a few traversing commands would want to recognize such
regions in order tonot follow non-canonical, or to look for infinite
looping, etc.

presumably org-id is the best solution for keeping track of which
files have or need virtual regions.  basically an underneath layer of
org-id [but maybe not limited to entries] that the user does not
interact with.

On 5/2/20, Samuel Wales <samologist@gmail.com> wrote:
> stating the obvious: org typically stores a forest [files] of trees of
> nodes.  some things you want to put into it are best expressed more
> generally than with trees.  i call it [boring name] the tree problem.
>
> there are a bunch of existing sort-of solutions, but to me the best is
> linking [as you mentioned], using org-id.  although that only links to
> entries, and it requires following links.  one entry becomes
> canonical.  you have to set metadata for the linking node.
>
> there are solutions not implemented that could be better that have
> been talked about on the mailng list, but they still have the issues
> of following links or other issues.
>
> duplication is out the window because dry.
>
> what you seem to want seems to require a feature in emacs in which you
> have virtual includable regions.  this can be done to a large degree
> at the buffer level, but not at the region level.
>
> that would open up some interesting possibilities, maybe including
> inline multi-mode stuff.  and it would fix your problem.  you could
> maybe color the one that is in the file itself differently, or keep
> all looking equal status to the user.
>
> i think there has been discussion on the mailing list and probalby on
> emacs-devel recently about an idea similar to this.  it migth be teh
> same as what you want.  not sure.
>
> it goes by a different name.  smoevbody will chime in i hope.
>
> On 5/2/20, David Rogers <davidandrewrogers@gmail.com> wrote:
>> Is there a method I can use to include the same subtree in several
>> different
>> files, such that editing one instance of that subtree updates the others
>> automatically? I'm hoping to be able to view the full version of the
>> subtree
>> in each of the files, without having to follow a link; if what I'm
>> describing isn't really possible, then I'll just use links in the other
>> files to point to the original subtree, which I know how to do. I'm just
>> exploring the sometimes-unexpected possibilities. :)
>>
>> --
>> Thanks
>> David
>>
>>
>
>
> --
> The Kafka Pandemic
>
> What is misopathy?
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I "multi-include" a subtree?
  2020-05-02 20:57 ` Samuel Wales
  2020-05-02 21:00   ` Samuel Wales
@ 2020-05-02 21:19   ` David Rogers
  2020-05-02 22:44   ` Samuel Wales
  2 siblings, 0 replies; 5+ messages in thread
From: David Rogers @ 2020-05-02 21:19 UTC (permalink / raw)
  To: emacs-orgmode

On May 2, 2020 1:57:02 p.m. PDT, Samuel Wales <samologist@gmail.com> wrote:

... you could
maybe color the one that is in the file itself differently, or keep
all looking equal status to the user.


In my situation it would certainly be fine to have only the canonical/original subtree editable, as long as any edits to it automatically propagated to the others. And the canonical/original one having a somewhat different appearance from the others is not an issue for me one way or the other.

-- 
David


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can I "multi-include" a subtree?
  2020-05-02 20:57 ` Samuel Wales
  2020-05-02 21:00   ` Samuel Wales
  2020-05-02 21:19   ` David Rogers
@ 2020-05-02 22:44   ` Samuel Wales
  2 siblings, 0 replies; 5+ messages in thread
From: Samuel Wales @ 2020-05-02 22:44 UTC (permalink / raw)
  To: David Rogers; +Cc: emacs-orgmode

to clarify.

On 5/2/20, Samuel Wales <samologist@gmail.com> wrote:
> there are a bunch of existing sort-of solutions, but to me the best is
> linking [as you mentioned], using org-id.  although that only links to
> entries, and it requires following links.  one entry becomes
> canonical.  you have to set metadata for the linking node.

i meant on the linked node, you set org-id in the properties drawer.
on the linking node, if it is an org id link on a node, you ahve to
set any metadata like todo kw.

***** [[id:9f4568cd-fdc8-4be3-86c0-98511e1d06a6][[2020-05-02 Sat
15:43] talked to jimmy carter]] -- needs metadata for good sorting and
searching
***** CONV [2020-05-02 Sat 15:43] talked to jimmy carter
:PROPERTIES:
:ID:       9f4568cd-fdc8-4be3-86c0-98511e1d06a6
:END:


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-02 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 20:09 Can I "multi-include" a subtree? David Rogers
2020-05-02 20:57 ` Samuel Wales
2020-05-02 21:00   ` Samuel Wales
2020-05-02 21:19   ` David Rogers
2020-05-02 22:44   ` Samuel Wales

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