emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-custom-id-goto?
@ 2019-12-04 15:26 Matt Price
  2019-12-04 15:45 ` org-custom-id-goto? Fraga, Eric
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matt Price @ 2019-12-04 15:26 UTC (permalink / raw)
  To: Org Mode

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

Is there a quasi-equivalent of ~org-id-goto~  or
~org-babel-goto-named-src-block~ which will jump to a header in the current
buffer? I' like to be able to quickly navigate to a buffer by name; usually
I give custom_id properties to headers that I am likely to link to, so
using that property would make sense. I'd also be happy with  a helm
interface to the actual headline text....

Just want ot check if I'm missing something that already exists before
trying to code my own!

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

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

* Re: org-custom-id-goto?
  2019-12-04 15:26 org-custom-id-goto? Matt Price
@ 2019-12-04 15:45 ` Fraga, Eric
  2019-12-05  1:36   ` org-custom-id-goto? John Kitchin
  2019-12-05  1:50 ` org-custom-id-goto? Thibault Marin
  2019-12-06  1:26 ` org-custom-id-goto? Adam Porter
  2 siblings, 1 reply; 8+ messages in thread
From: Fraga, Eric @ 2019-12-04 15:45 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

On Wednesday,  4 Dec 2019 at 10:26, Matt Price wrote:
> Is there a quasi-equivalent of ~org-id-goto~ or
> ~org-babel-goto-named-src-block~ which will jump to a header in the
> current buffer? 

If by header you mean headline or heading, I don't think there is
anything exactly how you might want it but you should maybe look at
"org-goto" and "org-occur" (or both in combination).
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.3-21-g36753e

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

* Re: org-custom-id-goto?
  2019-12-04 15:45 ` org-custom-id-goto? Fraga, Eric
@ 2019-12-05  1:36   ` John Kitchin
  2019-12-06 16:32     ` org-custom-id-goto? Haider Rizvi
  0 siblings, 1 reply; 8+ messages in thread
From: John Kitchin @ 2019-12-05  1:36 UTC (permalink / raw)
  To: emacs-orgmode

If you like ivy, you might find this helpful:

(defun ivy-org-jump-to-heading ()
  "Jump to heading in the current buffer."
  (interactive)
  (let ((headlines '()))
    (save-excursion
      (goto-char (point-min))
      (while (re-search-forward
	      ;; this matches org headings in elisp too.
	      "^\\(;; \\)?\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ 	]*$"  nil t)
	(cl-pushnew (list
		     (format "%-80s"
			     (match-string 0))
		     (cons 'position (match-beginning 0)))
		    headlines)))
    (ivy-read "Headline: "
	      (reverse headlines)
	      :action (lambda (candidate)
			(org-mark-ring-push)
			(goto-char (cdr (assoc 'position candidate)))
			(outline-show-entry)))))

https://github.com/jkitchin/scimax/blob/master/scimax-org.el#L587

There are also helm equivalents.

Fraga, Eric <e.fraga@ucl.ac.uk> writes:

> On Wednesday,  4 Dec 2019 at 10:26, Matt Price wrote:
>> Is there a quasi-equivalent of ~org-id-goto~ or
>> ~org-babel-goto-named-src-block~ which will jump to a header in the
>> current buffer?
>
> If by header you mean headline or heading, I don't think there is
> anything exactly how you might want it but you should maybe look at
> "org-goto" and "org-occur" (or both in combination).


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

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

* Re: org-custom-id-goto?
  2019-12-04 15:26 org-custom-id-goto? Matt Price
  2019-12-04 15:45 ` org-custom-id-goto? Fraga, Eric
@ 2019-12-05  1:50 ` Thibault Marin
  2019-12-05 20:27   ` org-custom-id-goto? Samuel Wales
  2019-12-06  1:26 ` org-custom-id-goto? Adam Porter
  2 siblings, 1 reply; 8+ messages in thread
From: Thibault Marin @ 2019-12-05  1:50 UTC (permalink / raw)
  To: emacs-orgmode



> I'd also be happy with a helm interface to the actual headline text....

I use `helm-semantic-or-imenu' to navigate between org headlines, it may
partly fit your needs.

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

* Re: org-custom-id-goto?
  2019-12-05  1:50 ` org-custom-id-goto? Thibault Marin
@ 2019-12-05 20:27   ` Samuel Wales
  2019-12-05 20:32     ` org-custom-id-goto? Samuel Wales
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2019-12-05 20:27 UTC (permalink / raw)
  To: thibault.marin; +Cc: emacs-orgmode

for ido, i use ido-hacks which speeds ido and makes it work
everywhere.  then i use org-refile with the prefix arg that makes it
do goto.

i also set a more restricted set of headers using refile and goto
tags, but org-refile probably does not recognize custom id.

On 12/4/19, Thibault Marin <thibault.marin@gmx.com> wrote:
>
>
>> I'd also be happy with a helm interface to the actual headline text....
>
> I use `helm-semantic-or-imenu' to navigate between org headlines, it may
> partly fit your needs.
>
>
>
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

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

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

* Re: org-custom-id-goto?
  2019-12-05 20:27   ` org-custom-id-goto? Samuel Wales
@ 2019-12-05 20:32     ` Samuel Wales
  0 siblings, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2019-12-05 20:32 UTC (permalink / raw)
  To: thibault.marin; +Cc: emacs-orgmode

to set to current file

(let ((org-refile-target-verify-function))
    (let ((org-refile-targets '((nil . (:maxlevel . 50)))))


On 12/5/19, Samuel Wales <samologist@gmail.com> wrote:
> for ido, i use ido-hacks which speeds ido and makes it work
> everywhere.  then i use org-refile with the prefix arg that makes it
> do goto.
>
> i also set a more restricted set of headers using refile and goto
> tags, but org-refile probably does not recognize custom id.
>
> On 12/4/19, Thibault Marin <thibault.marin@gmx.com> wrote:
>>
>>
>>> I'd also be happy with a helm interface to the actual headline text....
>>
>> I use `helm-semantic-or-imenu' to navigate between org headlines, it may
>> partly fit your needs.
>>
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> What is misopathy?
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
> The disease DOES progress. MANY people have died from it. And ANYBODY
> can get it at any time.
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

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

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

* Re: org-custom-id-goto?
  2019-12-04 15:26 org-custom-id-goto? Matt Price
  2019-12-04 15:45 ` org-custom-id-goto? Fraga, Eric
  2019-12-05  1:50 ` org-custom-id-goto? Thibault Marin
@ 2019-12-06  1:26 ` Adam Porter
  2 siblings, 0 replies; 8+ messages in thread
From: Adam Porter @ 2019-12-06  1:26 UTC (permalink / raw)
  To: emacs-orgmode

Functions like helm-org-in-buffer-headings,
helm-org-agenda-files-headings, etc. are built-in to the helm-org
package (they used to be part of the helm package, but now they're in
this separate helm-org package which is not installed automatically with
the helm package).

The packages org-rifle and org-ql are also helpful here.  For example,
with the command helm-org-ql, you could use a search query like:

    property:CUSTOM_ID=emacs-notes

You could also define a custom predicate that searches CUSTOM_ID
properties, so you could type a query like:

    cid=emacs-notes

You could even go a step further and define a custom command that used
that predicate by default, so you could simply type the custom ID as the
query.  See discussion at <https://github.com/alphapapa/org-ql/issues/61>.

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

* Re: org-custom-id-goto?
  2019-12-05  1:36   ` org-custom-id-goto? John Kitchin
@ 2019-12-06 16:32     ` Haider Rizvi
  0 siblings, 0 replies; 8+ messages in thread
From: Haider Rizvi @ 2019-12-06 16:32 UTC (permalink / raw)
  To: emacs-orgmode

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> If you like ivy, you might find this helpful:

Also see counsel-org-goto and counsel-org-goto-all, which provide
similar capability.

> Fraga, Eric <e.fraga@ucl.ac.uk> writes:
>
>> On Wednesday,  4 Dec 2019 at 10:26, Matt Price wrote:
>>> Is there a quasi-equivalent of ~org-id-goto~ or
>>> ~org-babel-goto-named-src-block~ which will jump to a header in the
>>> current buffer?
>>
>> If by header you mean headline or heading, I don't think there is
>> anything exactly how you might want it but you should maybe look at
>> "org-goto" and "org-occur" (or both in combination).
>
>
> --
> 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
>
>

-- 

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

end of thread, other threads:[~2019-12-06 17:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04 15:26 org-custom-id-goto? Matt Price
2019-12-04 15:45 ` org-custom-id-goto? Fraga, Eric
2019-12-05  1:36   ` org-custom-id-goto? John Kitchin
2019-12-06 16:32     ` org-custom-id-goto? Haider Rizvi
2019-12-05  1:50 ` org-custom-id-goto? Thibault Marin
2019-12-05 20:27   ` org-custom-id-goto? Samuel Wales
2019-12-05 20:32     ` org-custom-id-goto? Samuel Wales
2019-12-06  1:26 ` org-custom-id-goto? Adam Porter

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