emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Reciprocal links between items
@ 2020-10-01  8:53 Victor A. Stoichita
  2020-10-01  9:49 ` Alan Schmitt
  0 siblings, 1 reply; 7+ messages in thread
From: Victor A. Stoichita @ 2020-10-01  8:53 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

I wonder whether org-mode has a way to indicate reciprocal A↔B 
relations between two items. If item A points to item B, then 
automatically B also points to A.  Accordingly, when the relation 
is removed on A, it is also removed from B. 

I’m in the process of bringing my notes from Zotero to Org. 
What I’m after is something like Zotero’s "related" feature. 
Is there a way to represent that kind of relation in org?

Victor


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

* Re: Reciprocal links between items
  2020-10-01  8:53 Reciprocal links between items Victor A. Stoichita
@ 2020-10-01  9:49 ` Alan Schmitt
  2020-10-01 16:16   ` Victor A. Stoichita
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Schmitt @ 2020-10-01  9:49 UTC (permalink / raw)
  To: Victor A. Stoichita, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

On 2020-10-01 10:53, "Victor A. Stoichita" <victor@svictor.net> writes:

> I wonder whether org-mode has a way to indicate reciprocal A↔B 
> relations between two items. If item A points to item B, then 
> automatically B also points to A.  Accordingly, when the relation 
> is removed on A, it is also removed from B. 
>
> I’m in the process of bringing my notes from Zotero to Org. 
> What I’m after is something like Zotero’s "related" feature. 
> Is there a way to represent that kind of relation in org?

You might want to have a look at org-roam, that implements such
backlinks.

https://github.com/org-roam/org-roam

Best,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

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

* Re: Reciprocal links between items
  2020-10-01  9:49 ` Alan Schmitt
@ 2020-10-01 16:16   ` Victor A. Stoichita
  2020-10-01 21:53     ` Samuel Wales
  2020-10-02  1:42     ` Ihor Radchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2020-10-01 16:16 UTC (permalink / raw)
  Cc: emacs-orgmode


Le 01 Oct 2020, Alan Schmitt <alan.schmitt@polytechnique.org> 
a écrit :
> You might want to have a look at org-roam, that implements such
> backlinks.

Thanks Alan! That’s interesting!

I watched the introductory video and started reading the org-roam 
docs. They begin with the rationale of Zettelkasten note taking, 
which implies one org file per note, and an sqlite database… 
I think that org-roam can be a great tool, but it takes too big 
a change for what I need (basically just the ability to insert 
backlinks).

I guess that if I want something simple which avoids using an 
external database, I could write a function that inserts and 
deletes the links in both items. Maybe a good way to train my 
lisp-foo. 

Kind regards,
Victor




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

* Re: Reciprocal links between items
  2020-10-01 16:16   ` Victor A. Stoichita
@ 2020-10-01 21:53     ` Samuel Wales
  2020-10-02  8:29       ` Victor A. Stoichita
  2020-10-02  1:42     ` Ihor Radchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2020-10-01 21:53 UTC (permalink / raw)
  To: Victor A. Stoichita; +Cc: emacs-orgmode

Hi Victor,

Currently Org-ID can only be placed on entries.  This uses the
properties drawer.  When we are talking about entries, what I do is,
use Org-ID links to entries to go in one direction, and an agenda
search to go in the opposite direction as follows.


(define-key org-mode-map (kbd "C-c w") 'alpha-org-what-links-here)
(defun alpha-org-what-links-here ()
  "Show all links that point to the current node.
Possibly also show the target node itself.

I think this gets all archive files in $dorg, including ones with
no corresponding .org file.  See `alpha-org-all-org-files'.

  - fixme produce error if no id or fix non-id search
  - fixme Bug in Org: g in agenda removes entries =maybe fixed
  - fixme org text search does not work in non-org-mode files or
    in org files text above the outline tree ka
    - we might want to search in del and dsh also via grep

This makes Org ID links quasi-bidirectional.
"
  (interactive)
  (let ((org-agenda-files (alpha-org-all-org-files))

        org-agenda-skip-comment-trees
        org-agenda-skip-archived-trees

        (search-string (or
                        ;; inherits id from ancestors
                        ;; raw id so it will pick up target
                        (alpha-awhen (org-entry-get nil "ID" t)
                          (regexp-quote it))
                        (concat "{\\("
                                ;; tries searching a link to id
                                ;; not sure if useful
                                (regexp-quote (org-store-link nil))
                                "\\|\\<"
                                ;; not sure if useful
                                (regexp-quote (org-get-heading))
                                "\\>\\)}"))))
    (org-search-view nil search-string)))


When you say item, do you mean list item, or thing?  In either case,
Org cannot currently do this.

To do that, you can search the mailing list for ID markers and
implement them, which pretty much do what you want, or try
implementing something with the new link mechanism to include Org-ID.
This would allow them as link targets.

I think Org-ID is likely to be part of your mix, regardless of what
you do to implement this, if you do.

One concern I have is that Org-ID is already slow in searching.
Making it search for anything of a lower syntactic status than entries
might or might not make it slower.  Perhaps it would be necessary to
tell the search engine what it is looking for.


On 10/1/20, Victor A. Stoichita <victor@svictor.net> wrote:
>
> Le 01 Oct 2020, Alan Schmitt <alan.schmitt@polytechnique.org>
> a écrit :
>> You might want to have a look at org-roam, that implements such
>> backlinks.
>
> Thanks Alan! That’s interesting!
>
> I watched the introductory video and started reading the org-roam
> docs. They begin with the rationale of Zettelkasten note taking,
> which implies one org file per note, and an sqlite database…
> I think that org-roam can be a great tool, but it takes too big
> a change for what I need (basically just the ability to insert
> backlinks).
>
> I guess that if I want something simple which avoids using an
> external database, I could write a function that inserts and
> deletes the links in both items. Maybe a good way to train my
> lisp-foo.
>
> Kind regards,
> Victor
>
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


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

* Re: Reciprocal links between items
  2020-10-01 16:16   ` Victor A. Stoichita
  2020-10-01 21:53     ` Samuel Wales
@ 2020-10-02  1:42     ` Ihor Radchenko
  2020-10-02  8:16       ` Victor A. Stoichita
  1 sibling, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2020-10-02  1:42 UTC (permalink / raw)
  To: Victor A. Stoichita; +Cc: emacs-orgmode

> I think that org-roam can be a great tool, but it takes too big 
> a change for what I need (basically just the ability to insert 
> backlinks).

https://github.com/toshism/org-super-links is probably what you want.

Best,
Ihor


"Victor A. Stoichita" <victor@svictor.net> writes:

> Le 01 Oct 2020, Alan Schmitt <alan.schmitt@polytechnique.org> 
> a écrit :
>> You might want to have a look at org-roam, that implements such
>> backlinks.
>
> Thanks Alan! That’s interesting!
>
> I watched the introductory video and started reading the org-roam 
> docs. They begin with the rationale of Zettelkasten note taking, 
> which implies one org file per note, and an sqlite database… 
> I think that org-roam can be a great tool, but it takes too big 
> a change for what I need (basically just the ability to insert 
> backlinks).
>
> I guess that if I want something simple which avoids using an 
> external database, I could write a function that inserts and 
> deletes the links in both items. Maybe a good way to train my 
> lisp-foo. 
>
> Kind regards,
> Victor


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

* Re: Reciprocal links between items
  2020-10-02  1:42     ` Ihor Radchenko
@ 2020-10-02  8:16       ` Victor A. Stoichita
  0 siblings, 0 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2020-10-02  8:16 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode


Le 02 Oct 2020, Ihor Radchenko <yantar92@gmail.com> a écrit :
> https://github.com/toshism/org-super-links is probably what 
> you want.

Yes, this looks like it! Thank you Ihor!




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

* Re: Reciprocal links between items
  2020-10-01 21:53     ` Samuel Wales
@ 2020-10-02  8:29       ` Victor A. Stoichita
  0 siblings, 0 replies; 7+ messages in thread
From: Victor A. Stoichita @ 2020-10-02  8:29 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

> When you say item, do you mean list item, or thing?  In either 
> case,
> Org cannot currently do this.

That was unclear, sorry: I really meant linking two headings. 
I have one heading per note and the idea is to go back and forth 
between related notes. org-super-links promises to do just that so 
I think I’ll try it first. But being able to find all the links to 
a given heading will definitely be useful too. Thank you for 
sharing your way to do this! I’ll try to play with it from 
my agenda.

Cheers,
Victor


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

end of thread, other threads:[~2020-10-02  8:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01  8:53 Reciprocal links between items Victor A. Stoichita
2020-10-01  9:49 ` Alan Schmitt
2020-10-01 16:16   ` Victor A. Stoichita
2020-10-01 21:53     ` Samuel Wales
2020-10-02  8:29       ` Victor A. Stoichita
2020-10-02  1:42     ` Ihor Radchenko
2020-10-02  8:16       ` Victor A. Stoichita

Code repositories for project(s) associated with this 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).