From: John Kitchin <jkitchin@andrew.cmu.edu>
To: David Masterson <dsmasterson92630@outlook.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: References?? (feature idea)
Date: Sun, 14 Mar 2021 20:01:21 -0400 [thread overview]
Message-ID: <CAJ51ETo_a3k9ykpD3WdiOP+=0eEeua-iV3jGiDgY5VvZxeEa-w@mail.gmail.com> (raw)
In-Reply-To: <SJ0PR03MB54550042E08118DD539BC4539B6D9@SJ0PR03MB5455.namprd03.prod.outlook.com>
[-- 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 --]
next prev parent reply other threads:[~2021-03-15 0:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 23:24 References?? (feature idea) David Masterson
2021-03-15 0:01 ` John Kitchin [this message]
2021-03-15 1:10 ` David Masterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ51ETo_a3k9ykpD3WdiOP+=0eEeua-iV3jGiDgY5VvZxeEa-w@mail.gmail.com' \
--to=jkitchin@andrew.cmu.edu \
--cc=dsmasterson92630@outlook.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).