* References?? (feature idea)
@ 2021-03-14 23:24 David Masterson
2021-03-15 0:01 ` John Kitchin
0 siblings, 1 reply; 3+ messages in thread
From: David Masterson @ 2021-03-14 23:24 UTC (permalink / raw)
To: emacs-orgmode
I don't see this capability in Org, but maybe I'm missing it.
My use case is that I setup an Org file as my phonebook. Each child
header (ie. no subheaders) is a person in my phonebook. I can
categorize them using parent headers. All information about a person is
stored in PROPERTY drawers (but, you could have information outside the
drawer).
What I'd like to do is include a "reference" to a PROPERTY in the
phonebook entry in other Org files so that phone and address is stored
in the phonebook, but I want the "reference" to become the value of the
PROPERTY when the other Org file is exported. I could do a link to the
phonebook Org file, but that is a link and not the data. I'd prefer to
have (say) an exported PDF be standalone and not have references to the
other file that I would also have to export. One reason is that I might
have "confidential" information in the phonebook.
Does this make sense? Has it been done?
--
David Masterson
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: References?? (feature idea)
2021-03-14 23:24 References?? (feature idea) David Masterson
@ 2021-03-15 0:01 ` John Kitchin
2021-03-15 1:10 ` David Masterson
0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2021-03-15 0:01 UTC (permalink / raw)
To: David Masterson; +Cc: org-mode-email
[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]
You could define a new org link with this behavior. You just need to work
out a syntax for a link to the heading that also includes the property
name. e.g. [[property:file.org::*Heading::property]]
then, define a :follow function that probably opens the heading when you
open it, and an :export function that looks up the property and uses that
value on export.
You would split your path on ::, then you should have a list like (file
heading property-name). For the follow function, just find-file on the
filename, then search for the heading. For the export, wrap that in
save-window-excursion, and use (org-entry-get) on the heading to get the
property value.
John
-----------------------------------
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
On Sun, Mar 14, 2021 at 7:41 PM David Masterson <
dsmasterson92630@outlook.com> wrote:
> I don't see this capability in Org, but maybe I'm missing it.
>
> My use case is that I setup an Org file as my phonebook. Each child
> header (ie. no subheaders) is a person in my phonebook. I can
> categorize them using parent headers. All information about a person is
> stored in PROPERTY drawers (but, you could have information outside the
> drawer).
>
> What I'd like to do is include a "reference" to a PROPERTY in the
> phonebook entry in other Org files so that phone and address is stored
> in the phonebook, but I want the "reference" to become the value of the
> PROPERTY when the other Org file is exported. I could do a link to the
> phonebook Org file, but that is a link and not the data. I'd prefer to
> have (say) an exported PDF be standalone and not have references to the
> other file that I would also have to export. One reason is that I might
> have "confidential" information in the phonebook.
>
> Does this make sense? Has it been done?
> --
> David Masterson
>
>
[-- Attachment #2: Type: text/html, Size: 2727 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: References?? (feature idea)
2021-03-15 0:01 ` John Kitchin
@ 2021-03-15 1:10 ` David Masterson
0 siblings, 0 replies; 3+ messages in thread
From: David Masterson @ 2021-03-15 1:10 UTC (permalink / raw)
To: John Kitchin; +Cc: org-mode-email
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> You could define a new org link with this behavior. You just need to
> work out a syntax for a link to the heading that also includes the
> property name. e.g. [[property:file.org::*Heading::property]]
>
> then, define a :follow function that probably opens the heading when
> you open it, and an :export function that looks up the property and
> uses that value on export.
>
> You would split your path on ::, then you should have a list like
> (file heading property-name). For the follow function, just find-file
> on the filename, then search for the heading. For the export, wrap
> that in save-window-excursion, and use (org-entry-get) on the heading
> to get the property value.
Hmm. Interesting. I'll have to think about that.
--
David Masterson
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-15 1:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-14 23:24 References?? (feature idea) David Masterson
2021-03-15 0:01 ` John Kitchin
2021-03-15 1:10 ` David Masterson
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).