toshism / org-super-links

Package to create links with auto backlinks
GNU General Public License v3.0
285 stars 20 forks source link

Could it be possible to copy a property when inserting a link? #47

Closed Ypot closed 4 years ago

Ypot commented 4 years ago

Some times the notes I create are linked to a highlight of a book that has an image attached.

If I want to attach the image to the note too, I have to copy the attahcment's DIR manually.

Is it possible that, when inserting a link, the DIR to be detected and copy to the PROPERTIES drawer? Example where in both entries I want to show the same image, so it would be helpful to copy the :DIR: property:

HIGHTLIGHT WITH IMAGE:

* Lowenfels, 2010, p. 14                                         :ATTACH:
:PROPERTIES:
:DIR:      ~/NOTAS/data/Lowenfels.2010.TeamingMicrobesOrganic/
:ID:       20201027T051213.039128
:END:
:LINKS:
- [[id:20201027T051213.165136][Las hifas protegen a las raíces, dificultando el acceso a los nematodos que se alimentan de raíces, incluso]]
:END:
[[attachment:Lowenfels.2010.TeamingMicrobesOrganic.p.14.jpg]]
"A foraging, root-eating nematode, trapped by a fungal hypha."

NOTE:

**** Las hifas protegen a las raíces, dificultando el acceso a los nematodos que se alimentan de raíces, incluso
:PROPERTIES:
:ID:       20201027T051213.165136
:DIR:      ~/NOTAS/data/Lowenfels.2010.TeamingMicrobesOrganic/
:END:
:LINKS:
- [[id:20201027T051213.039128][Lowenfels, 2010, p. 14]]
:END:
atrapándolos.
[[attachment:Lowenfels.2010.TeamingMicrobesOrganic.p.14.jpg]]

A thought: maybe it could be customizable to chose what PROPERTIES we want to be copied, so it is not limited just to my needs with attachments, but the user could choose them. Even, maybe the user could choose the DRAWER too.

toshism commented 4 years ago

While I can see the usefulness of something like this, I think it's beyond the scope of this package. Thanks for the idea though. This could probably be built on top of the org-linker package I've been gradually experimenting with pretty easily.