all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to generate a list of ``who-links''?
@ 2018-10-14 15:22 Mirko Vukovic
  2018-10-14 22:08 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Mirko Vukovic @ 2018-10-14 15:22 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

Hello,

I am looking for a way to get a list of all remote references to the
current node?

Currently, I do:
- org-id-copy
- In org-agenda I search the copied id.

Is there
- a better built-in way?
- a contributed-package?
- a suggestion how to code it in my elisp?

Thanks,

Mirko

[-- Attachment #2: Type: text/html, Size: 474 bytes --]

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

* Re: How to generate a list of ``who-links''?
  2018-10-14 15:22 How to generate a list of ``who-links''? Mirko Vukovic
@ 2018-10-14 22:08 ` Samuel Wales
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Wales @ 2018-10-14 22:08 UTC (permalink / raw)
  To: Mirko Vukovic; +Cc: emacs-orgmode@gnu.org

this is good eonugh for me but perhaps you want to improve on it.

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

  - fixme Bug in Org: g in agenda removes entries
  - fixme org text search does not work in non-org-mode files or
    in org files text above the outline tree ka

This makes 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
                        ;; 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)))

On 10/14/18, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
> Hello,
>
> I am looking for a way to get a list of all remote references to the
> current node?
>
> Currently, I do:
> - org-id-copy
> - In org-agenda I search the copied id.
>
> Is there
> - a better built-in way?
> - a contributed-package?
> - a suggestion how to code it in my elisp?
>
> Thanks,
>
> Mirko
>


-- 
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] 2+ messages in thread

end of thread, other threads:[~2018-10-14 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-14 15:22 How to generate a list of ``who-links''? Mirko Vukovic
2018-10-14 22:08 ` Samuel Wales

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.