emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* can capture create search links?
@ 2018-09-28 22:20 Samuel Wales
  2018-09-29 20:35 ` Julius Dittmar
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2018-09-28 22:20 UTC (permalink / raw)
  To: emacs-orgmode

i capture using %a.

from org, %a results in a file link with a pathname and a search
within that file.  if i then refile the target to a new file, the link
is broken.  but even if %a created a search link, it would search
within only that file, so refiling to a new file would break the link.

what i'd like is for capture to produce a link that, when clicked,
will search through my agenda files and text search extra files for a
matching header.

is this possible?

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

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

* can capture create search links?
  2018-09-28 22:20 can capture create search links? Samuel Wales
@ 2018-09-29 20:35 ` Julius Dittmar
  2018-09-29 22:42   ` Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Julius Dittmar @ 2018-09-29 20:35 UTC (permalink / raw)
  To: emacs-orgmode

Hi Samuel,

as to org I only have user status, so there may be better solutions for you.

Am 29.09.18 um 00:20 schrieb Samuel Wales:
> what i'd like is for capture to produce a link that, when clicked,
> will search through my agenda files and text search extra files for a
> matching header.

I use IDs for that purpose.
In my config file I added

(require 'org-id)
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)

In all capture templates, IDs are automatically added by adding,
immediately after the heading and a possible scheduling line,
":PROPERTIES:\n:ID: %(org-id-new)\n:END:\n" within the template string.

With this, %a in the template string is replaced by that ID if the ID
exists. The ID survives refiling.

Hope that helps,

Julius

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

* Re: can capture create search links?
  2018-09-29 20:35 ` Julius Dittmar
@ 2018-09-29 22:42   ` Samuel Wales
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2018-09-29 22:42 UTC (permalink / raw)
  To: Julius Dittmar; +Cc: emacs-orgmode

hi j,

thanks for commenting.

i use org-id extensively.

however, if i am just capturing a note on an org entry that does not
already have an org-id, i want the link so that i have context for
what i am talking about, but i do not want to create an org-id.

org-id for this purpose would clutter org too much, as it would create
an org-id for every tiny little teensy org entry.

that is why i want %a [or something similar] to create a search link
for the header text, which searches all agenda files and text search
extra files [not just the current file].

that would give me the context i need, with a mostly-unbreakable link
[i don't need perfection in this case], that tells me where i was when
i made the note.

although i use org-id extensively, i don't want to use org-id for this.

samuel

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

end of thread, other threads:[~2018-09-29 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 22:20 can capture create search links? Samuel Wales
2018-09-29 20:35 ` Julius Dittmar
2018-09-29 22:42   ` Samuel Wales

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).