* Multi-Parent Nodes in org-mode
@ 2009-07-16 15:59 aartist
2009-07-16 21:44 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: aartist @ 2009-07-16 15:59 UTC (permalink / raw
To: help-gnu-emacs
I like to have the nodes in org-mode that can have multiple parents.
A : 1,2
B : 1,3
C: 2,3,4
The above should easily be transferred too.
1 ! A,B
2 ! A,C
3 ! B,C
4 ! C
Also somehow I should be able to see linking of parent-child nodes,
which I should be able to export in Flash or HTML.
Program generating drawing links may require some intelligence, but
with 2 levels it shouldn't be very difficult.
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 15:59 Multi-Parent Nodes in org-mode aartist
@ 2009-07-16 21:44 ` Bastien
2009-07-16 22:07 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-16 21:44 UTC (permalink / raw
To: aartist; +Cc: help-gnu-emacs
aartist <aartist@gmail.com> writes:
> I like to have the nodes in org-mode that can have multiple parents.
>
> A : 1,2
> B : 1,3
> C: 2,3,4
>
> The above should easily be transferred too.
>
> 1 ! A,B
> 2 ! A,C
> 3 ! B,C
> 4 ! C
I don't see how to do it with a tree structure, and Org-mode is very
tree-oriented.
Maybe we can emulate this by having just a flat list of tasks and by
adding two properties :Parents: and :Children:, each one indexing the
parents' ids and the children ids. But I don't see clearly how useful
it would be.
Maybe you have something specific in mind?
> Also somehow I should be able to see linking of parent-child nodes,
> which I should be able to export in Flash or HTML.
>
> Program generating drawing links may require some intelligence, but
> with 2 levels it shouldn't be very difficult.
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 21:44 ` Bastien
@ 2009-07-16 22:07 ` Lennart Borgman
2009-07-16 22:18 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-16 22:07 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs
On Thu, Jul 16, 2009 at 11:44 PM, Bastien<bastienguerry@googlemail.com> wrote:
> aartist <aartist@gmail.com> writes:
>
>> I like to have the nodes in org-mode that can have multiple parents.
>>
>> A : 1,2
>> B : 1,3
>> C: 2,3,4
>>
>> The above should easily be transferred too.
>>
>> 1 ! A,B
>> 2 ! A,C
>> 3 ! B,C
>> 4 ! C
>
> I don't see how to do it with a tree structure, and Org-mode is very
> tree-oriented.
>
> Maybe we can emulate this by having just a flat list of tasks and by
> adding two properties :Parents: and :Children:, each one indexing the
> parents' ids and the children ids. But I don't see clearly how useful
> it would be.
I think the suggestion does not fit tree structures, but a two way
graph like that can be printed in two dimensional space -- ie if you
just print children and parents belonging to one node at a time. You
can look at it as a two-way tree (don't know if anyone actually uses
that term, but it is a subset of graphs).
In case of org-mode and the capabilities you have to show a graph as
text you could simply just show the parents as links, something like
this:
* Other parent
** Other parent child
* Parent
** Child
# Other parent (make this a link)
Other parent body
## Other parent child
# Next parent child (make this a link)
Child body
* Next parent
** Next parent child
I am not sure this will be tremendous useful in a case like this
however. However I am not sure. It is a common problems when
structuring knowledge so it might be. So if someone wants to use
org-mode for that it may be useful.
For a solution like the one above you have to think about how to
manage editing of the "# parent" part. I think it may be implemented
as 'after-string overlay properties in the buffer, perhaps with some
hooks for updating.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 22:07 ` Lennart Borgman
@ 2009-07-16 22:18 ` Bastien
2009-07-16 22:21 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-16 22:18 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> * Other parent
> ** Other parent child
> * Parent
> ** Child
> # Other parent (make this a link)
> Other parent body
> ## Other parent child
> # Next parent child (make this a link)
> Child body
> * Next parent
> ** Next parent child
Isn't the reference from one node (subtree) to another easier with
just ids? Org already handles ids, so if someone want to implement
graph-capabilities in Org he should take this road IMHO...
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 22:18 ` Bastien
@ 2009-07-16 22:21 ` Lennart Borgman
2009-07-16 22:36 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-16 22:21 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs
On Fri, Jul 17, 2009 at 12:18 AM, Bastien<bastienguerry@googlemail.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> * Other parent
>> ** Other parent child
>> * Parent
>> ** Child
>> # Other parent (make this a link)
>> Other parent body
>> ## Other parent child
>> # Next parent child (make this a link)
>> Child body
>> * Next parent
>> ** Next parent child
>
> Isn't the reference from one node (subtree) to another easier with
> just ids? Org already handles ids, so if someone want to implement
> graph-capabilities in Org he should take this road IMHO...
What are "ids" in this context? Can you please give me a reference to
the Org manual?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 22:21 ` Lennart Borgman
@ 2009-07-16 22:36 ` Bastien
2009-07-16 22:46 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-16 22:36 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> What are "ids" in this context?
Unique identifiers for subtrees.
> Can you please give me a reference to the Org manual?
It is documented in org-id.el, which comes with latest Emacs or org.
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 22:36 ` Bastien
@ 2009-07-16 22:46 ` Lennart Borgman
2009-07-16 23:20 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-16 22:46 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs
On Fri, Jul 17, 2009 at 12:36 AM, Bastien<bastienguerry@googlemail.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> What are "ids" in this context?
>
> Unique identifiers for subtrees.
>
>> Can you please give me a reference to the Org manual?
>
> It is documented in org-id.el, which comes with latest Emacs or org.
Thanks, I think I see what you mean. Not sure if ids are better than
headlines though. That depends quite a bit on how ids are displayed in
links.
Are the headline text displayed in the links? How do you create them.
As a sidenote I notice that it is actually quite hard to add a
hyperlink to a headline. If you from the menus choose "add hyperlink"
you get into another track. Should not making links to headlines and
ids be there too?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 22:46 ` Lennart Borgman
@ 2009-07-16 23:20 ` Bastien
2009-07-16 23:38 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-16 23:20 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs
Lennart Borgman <lennart.borgman@gmail.com> writes:
> Thanks, I think I see what you mean. Not sure if ids are better than
> headlines though. That depends quite a bit on how ids are displayed in
> links.
I think IDs are more stable than headlines. If the headline is the id
of the node, then changing one single char of the headline can make it
invisible for other nodes refering to it. With IDs as properties you
don't need to care about the headline.
* My task
:PROPERTIES:
:ID: q8ic5nz0voe0
:END:
Try M-x org-store-link with the cursor within this subtree,
and then try M-x org-insert-link -- it will insert this:
[[id:q8ic5nz0voe0][My task]]
Since "My task" is just a label, no problem, the headline can change the
link will still be okay. You can even link between different files, it
will be okay.
> Are the headline text displayed in the links? How do you create them.
See above.
> As a sidenote I notice that it is actually quite hard to add a
> hyperlink to a headline.
For me I just bind org-store-link to C-c l and that's it...
> If you from the menus choose "add hyperlink" you get into another
> track. Should not making links to headlines and ids be there too?
For me it is here - maybe I don't understand?
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 23:20 ` Bastien
@ 2009-07-16 23:38 ` Lennart Borgman
2009-07-17 7:48 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-16 23:38 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs
On Fri, Jul 17, 2009 at 1:20 AM, Bastien<bastienguerry@googlemail.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> Thanks, I think I see what you mean. Not sure if ids are better than
>> headlines though. That depends quite a bit on how ids are displayed in
>> links.
>
> I think IDs are more stable than headlines.
Yes, I thought you meant that.
> If the headline is the id
> of the node, then changing one single char of the headline can make it
> invisible for other nodes refering to it. With IDs as properties you
> don't need to care about the headline.
>
> * My task
> :PROPERTIES:
> :ID: q8ic5nz0voe0
> :END:
>
> Try M-x org-store-link with the cursor within this subtree,
> and then try M-x org-insert-link -- it will insert this:
>
> [[id:q8ic5nz0voe0][My task]]
>
> Since "My task" is just a label, no problem, the headline can change the
> link will still be okay. You can even link between different files, it
> will be okay.
>
>> Are the headline text displayed in the links? How do you create them.
>
> See above.
Thanks for the example. That way it works.
>> As a sidenote I notice that it is actually quite hard to add a
>> hyperlink to a headline.
>
> For me I just bind org-store-link to C-c l and that's it...
>> If you from the menus choose "add hyperlink" you get into another
>> track. Should not making links to headlines and ids be there too?
>
> For me it is here - maybe I don't understand?
I think I understand how it is implemented now, but it has unnecessary
restrictions. Suppose you do M-x org-insert-link before you store any
link. Then you do not get any way to add a link to the nodes in the
current file or any other file. I think the code to do this is nearly
there, but ...
(info "(org) Internal links") says:
To insert a link targeting a headline, in-buffer completion can be
used. Just type a star followed by a few optional letters into the
buffer and press `M-<TAB>'.
That does not work for me. You can surely do in buffer completion (but
I do not know why this is useful here), but a link is not inserted.
How do you actually do it from that point?
May I suggest using more normal completion? Then for example Company
Mode can be used... - it can handle many completions nicely so having
candidates from a set of files is not a problem...
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-16 23:38 ` Lennart Borgman
@ 2009-07-17 7:48 ` Bastien
2009-07-17 8:19 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-17 7:48 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs, Carsten Dominik
Lennart Borgman <lennart.borgman@gmail.com> writes:
> (info "(org) Internal links") says:
>
> To insert a link targeting a headline, in-buffer completion can be
> used. Just type a star followed by a few optional letters into the
> buffer and press `M-<TAB>'.
>
> That does not work for me.
If you suggest that the completion should then offer only headlines,
yes, it doesn't work like this.
> You can surely do in buffer completion (but
> I do not know why this is useful here), but a link is not inserted.
This part of the manual is about /internal/ links, not links in
general. So as I understand it, it says that a link like this works:
[[* My headline][A link to My headline]]
... and so it does.
Maybe typing [[* M-TAB could offer completion for in-buffer headlines,
and use IDs when available, but that's a big change. Copying Carsten if
he has a take on this.
> May I suggest using more normal completion? Then for example Company
> Mode can be used... - it can handle many completions nicely so having
> candidates from a set of files is not a problem...
I'm not familiar with Company mode and I think the problem you raised is
quite specific - interactions with another completion mode is another
issue, no?
Thanks for bringing this up anyway.
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-17 7:48 ` Bastien
@ 2009-07-17 8:19 ` Lennart Borgman
2009-07-17 9:00 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-17 8:19 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs, Carsten Dominik
On Fri, Jul 17, 2009 at 9:48 AM, Bastien<bastienguerry@googlemail.com> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> (info "(org) Internal links") says:
>>
>> To insert a link targeting a headline, in-buffer completion can be
>> used. Just type a star followed by a few optional letters into the
>> buffer and press `M-<TAB>'.
>>
>> That does not work for me.
>
> If you suggest that the completion should then offer only headlines,
> yes, it doesn't work like this.
>
>> You can surely do in buffer completion (but
>> I do not know why this is useful here), but a link is not inserted.
>
> This part of the manual is about /internal/ links, not links in
> general. So as I understand it, it says that a link like this works:
>
> [[* My headline][A link to My headline]]
>
> ... and so it does.
I see. I just typed
* Some title TAB
and thought it would insert a link, like inserting a link from the
menus with "Insert Link" does.
It looks to me that there is no easy way to insert an internal link.
It is actually easier to insert a url. So what I is suggesting is
adding an alternative "Internal" to all those "bbd: bibtex: elisp:
..." etc. And from that just prompt as when inserting URLs. (But
perhaps get the file name through prompting and prompt for anchors
etc.)
That would make it much easier for a newbie like me on this.
> Maybe typing [[* M-TAB could offer completion for in-buffer headlines,
> and use IDs when available, but that's a big change. Copying Carsten if
> he has a take on this.
Why is using IDs a big change?
>> May I suggest using more normal completion? Then for example Company
>> Mode can be used... - it can handle many completions nicely so having
>> candidates from a set of files is not a problem...
>
> I'm not familiar with Company mode and I think the problem you raised is
> quite specific - interactions with another completion mode is another
> issue, no?
I just tried Company Mode in an Org buffer. Strange things happen. The
Company Mode menus have shown up very nicely in all other buffers. It
looks like this
http://www.emacswiki.org/emacs/CompanyMode
Colored in buffer menus. However in Org buffers the colors disappears
and the text is scrambled. Three dots shows up so it looks like some
problem with hidden text. Any hint about that? Anything really strange
in Org font lock or something like that ... ;-)
> Thanks for bringing this up anyway.
>
> --
> Bastien
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-17 8:19 ` Lennart Borgman
@ 2009-07-17 9:00 ` Bastien
2009-07-18 14:31 ` Lennart Borgman
0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-17 9:00 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs, Carsten Dominik
Lennart Borgman <lennart.borgman@gmail.com> writes:
> It looks to me that there is no easy way to insert an internal link.
Agreed.
> It is actually easier to insert a url. So what I is suggesting is
> adding an alternative "Internal" to all those "bbd: bibtex: elisp:
> ..." etc.
Since [[* A headline][A headline]] works, we just need org-insert-link
to allow completion after the * char. Then converting this internal
link to an id if necessary.
But maybe internal links are not *that* common and storing the link
before inserting it is okay?
> And from that just prompt as when inserting URLs. (But
> perhaps get the file name through prompting and prompt for anchors
> etc.)
Yes, perhaps I will find time to work on implementing what I describe
above.
>> Maybe typing [[* M-TAB could offer completion for in-buffer headlines,
>> and use IDs when available, but that's a big change. Copying Carsten if
>> he has a take on this.
>
> Why is using IDs a big change?
No, I meant implementing [[* and completing for in-buffer headlines.
Carsten is on holidays, and this is an UI change, not a bug fix.
I try to confine myself to bugfixes for now :)
>>> May I suggest using more normal completion? Then for example Company
>>> Mode can be used... - it can handle many completions nicely so having
>>> candidates from a set of files is not a problem...
>>
>> I'm not familiar with Company mode and I think the problem you raised is
>> quite specific - interactions with another completion mode is another
>> issue, no?
>
> I just tried Company Mode in an Org buffer. Strange things happen. The
> Company Mode menus have shown up very nicely in all other buffers. It
> looks like this
>
> http://www.emacswiki.org/emacs/CompanyMode
>
> Colored in buffer menus. However in Org buffers the colors disappears
> and the text is scrambled. Three dots shows up so it looks like some
> problem with hidden text. Any hint about that? Anything really strange
> in Org font lock or something like that ... ;-)
Please report this in details on emacs-orgmode@gnu.org, perhaps some
company user can help debugging this.
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-17 9:00 ` Bastien
@ 2009-07-18 14:31 ` Lennart Borgman
2009-07-18 17:39 ` Bastien
0 siblings, 1 reply; 14+ messages in thread
From: Lennart Borgman @ 2009-07-18 14:31 UTC (permalink / raw
To: Bastien; +Cc: aartist, help-gnu-emacs, Carsten Dominik
On Fri, Jul 17, 2009 at 11:00 AM, Bastien<bastienguerry@googlemail.com> wrote:
>> I just tried Company Mode in an Org buffer. Strange things happen. The
>> Company Mode menus have shown up very nicely in all other buffers. It
>> looks like this
>>
>> http://www.emacswiki.org/emacs/CompanyMode
>>
>> Colored in buffer menus. However in Org buffers the colors disappears
>> and the text is scrambled. Three dots shows up so it looks like some
>> problem with hidden text. Any hint about that? Anything really strange
>> in Org font lock or something like that ... ;-)
>
> Please report this in details on emacs-orgmode@gnu.org, perhaps some
> company user can help debugging this.
I have looked into it. There are numerous Emacs bugs involved and I
have filed bug reports for some of them now.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Multi-Parent Nodes in org-mode
2009-07-18 14:31 ` Lennart Borgman
@ 2009-07-18 17:39 ` Bastien
0 siblings, 0 replies; 14+ messages in thread
From: Bastien @ 2009-07-18 17:39 UTC (permalink / raw
To: Lennart Borgman; +Cc: aartist, help-gnu-emacs, Carsten Dominik
Lennart Borgman <lennart.borgman@gmail.com> writes:
> On Fri, Jul 17, 2009 at 11:00 AM, Bastien<bastienguerry@googlemail.com> wrote:
>
>>> I just tried Company Mode in an Org buffer. Strange things happen. The
>>> Company Mode menus have shown up very nicely in all other buffers. It
>>> looks like this
>>>
>>> http://www.emacswiki.org/emacs/CompanyMode
>>>
>>> Colored in buffer menus. However in Org buffers the colors disappears
>>> and the text is scrambled. Three dots shows up so it looks like some
>>> problem with hidden text. Any hint about that? Anything really strange
>>> in Org font lock or something like that ... ;-)
>>
>> Please report this in details on emacs-orgmode@gnu.org, perhaps some
>> company user can help debugging this.
>
> I have looked into it. There are numerous Emacs bugs involved and I
> have filed bug reports for some of them now.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-07-18 17:39 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 15:59 Multi-Parent Nodes in org-mode aartist
2009-07-16 21:44 ` Bastien
2009-07-16 22:07 ` Lennart Borgman
2009-07-16 22:18 ` Bastien
2009-07-16 22:21 ` Lennart Borgman
2009-07-16 22:36 ` Bastien
2009-07-16 22:46 ` Lennart Borgman
2009-07-16 23:20 ` Bastien
2009-07-16 23:38 ` Lennart Borgman
2009-07-17 7:48 ` Bastien
2009-07-17 8:19 ` Lennart Borgman
2009-07-17 9:00 ` Bastien
2009-07-18 14:31 ` Lennart Borgman
2009-07-18 17:39 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.