emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* navi equivalent to 'g' speed command?
@ 2014-09-03  6:51 Alan Schmitt
  2014-09-03  7:18 ` Thorsten Jolitz
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Schmitt @ 2014-09-03  6:51 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

I very often use the org speed command 'g' to navigate to a headline
(it opens a completion buffer that I can use to quickly fuzzy match the
target). Is there an equivalent navi workflow for non-org buffer in
outshine mode?

Thanks,

Alan 

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  6:51 navi equivalent to 'g' speed command? Alan Schmitt
@ 2014-09-03  7:18 ` Thorsten Jolitz
  2014-09-03  7:47   ` Alan Schmitt
  2014-09-03  7:59   ` Thorsten Jolitz
  0 siblings, 2 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2014-09-03  7:18 UTC (permalink / raw)
  To: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

Hello,

> I very often use the org speed command 'g' to navigate to a headline
> (it opens a completion buffer that I can use to quickly fuzzy match the
> target). Is there an equivalent navi workflow for non-org buffer in
> outshine mode?

Hmm... which command do you mean? I get

,----
| User-defined Speed commands
| ===========================
| 
| Built-in Speed commands
| =======================
| 
| Outline Navigation
| ------------------
| [...]
| g   (org-refile t)
`----

but thats not the one you are talking about, right?

-- 
cheers,
Thorsten

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  7:18 ` Thorsten Jolitz
@ 2014-09-03  7:47   ` Alan Schmitt
  2014-09-03  8:28     ` Thorsten Jolitz
  2014-09-03  7:59   ` Thorsten Jolitz
  1 sibling, 1 reply; 8+ messages in thread
From: Alan Schmitt @ 2014-09-03  7:47 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode

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

On 2014-09-03 09:18, Thorsten Jolitz <tjolitz@gmail.com> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
> Hello,
>
>> I very often use the org speed command 'g' to navigate to a headline
>> (it opens a completion buffer that I can use to quickly fuzzy match the
>> target). Is there an equivalent navi workflow for non-org buffer in
>> outshine mode?
>
> Hmm... which command do you mean? I get
>
> ,----
> | User-defined Speed commands
> | ===========================
> | 
> | Built-in Speed commands
> | =======================
> | 
> | Outline Navigation
> | ------------------
> | [...]
> | g   (org-refile t)
> `----
>
> but thats not the one you are talking about, right?

Yes, it's the one I mean. Don't let the "refile" fool you: the 't'
argument means nothing is actually refiled during the jump to the
target. I use it all the time.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  7:18 ` Thorsten Jolitz
  2014-09-03  7:47   ` Alan Schmitt
@ 2014-09-03  7:59   ` Thorsten Jolitz
  2014-09-03 18:40     ` Alan Schmitt
  1 sibling, 1 reply; 8+ messages in thread
From: Thorsten Jolitz @ 2014-09-03  7:59 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
> Hello,
>
>> I very often use the org speed command 'g' to navigate to a headline
>> (it opens a completion buffer that I can use to quickly fuzzy match the
>> target). Is there an equivalent navi workflow for non-org buffer in
>> outshine mode?
>
> Hmm... which command do you mean? I get

> | g   (org-refile t)
> `----
>
> but thats not the one you are talking about, right?

I just tried it out - this 

,----
| g  (org-refile t)
`----

works in Outshine like in Org when using the tj-outshine branch from the
github repo, assuming you have

,----
| (setq outshine-use-speed-commands t)
`----

in you init file. 

All 3 libs (outshine, outorg and navi-mode) have developed quite a bit
recently, but I want to include better tests for outorg and implement
most of Org-mode's user API (like e.g. org-refile) via the
`outshine-use-outorg' function before I merge the tj-outshine, tj-outorg
and tj-navi branches into their repective masters.

Maybe you could switch to the git-versions? Would be great for me to
have the development branches tested by somebody else, and you would get
the `outshine-use-outorg' functionality, which (in theory at least)
allows to call any Org command from Outshine. In the real world some
commands work out of the box (e.g. org-refile and org-priority), but
others would need some special handling (i.e. clocking with outshine
headers works only 'more-or-less').

There are so many Org commands, it will take some time to check if they
make sense in Outshine too, if they work out of the box or need some
extra hacking. But with the development version of outshine, one can
simply try if something like this works without any extra effort:

#+BEGIN_SRC emacs-lisp
(defun outshine-priority ()
  "Call outorg to trigger `org-priority'."
  (interactive)
  (outshine-use-outorg 'org-priority))
#+END_SRC

-- 
cheers,
Thorsten

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  7:47   ` Alan Schmitt
@ 2014-09-03  8:28     ` Thorsten Jolitz
  2014-09-03 18:48       ` Alan Schmitt
  0 siblings, 1 reply; 8+ messages in thread
From: Thorsten Jolitz @ 2014-09-03  8:28 UTC (permalink / raw)
  To: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> On 2014-09-03 09:18, Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>>
>> Hello,
>>
>>> I very often use the org speed command 'g' to navigate to a headline
>>> (it opens a completion buffer that I can use to quickly fuzzy match the
>>> target). Is there an equivalent navi workflow for non-org buffer in
>>> outshine mode?
>>
>> Hmm... which command do you mean? I get
>>
>> ,----
>> | User-defined Speed commands
>> | ===========================
>> | 
>> | Built-in Speed commands
>> | =======================
>> | 
>> | Outline Navigation
>> | ------------------
>> | [...]
>> | g   (org-refile t)
>> `----
>>
>> but thats not the one you are talking about, right?
>
> Yes, it's the one I mean. Don't let the "refile" fool you: the 't'
> argument means nothing is actually refiled during the jump to the
> target. I use it all the time.

ok, it seems 'outshine-refile does works, but I'm not sufficiently used
to it - it actually refiles the outshine headers I'm on, but that seems
to be a configuration thing. 

I could expand 

#+BEGIN_SRC emacs-lisp
(defun outshine-refile ()
  "Call outorg to trigger `org-refile'."
  (interactive)
  (outshine-use-outorg 'org-refile))
#+END_SRC

to something like

#+BEGIN_SRC emacs-lisp
(defun outshine-refile (&optional arg)
  "Call outorg to trigger `org-refile'."
  (interactive "P")
  (if arg
     (outshine-use-outorg 'org-refile nil nil t)
    (outshine-use-outorg 'org-refile)))
#+END_SRC

to match you use case, but I think what you really want is


,----[ C-h f outshine-imenu RET ]
| outshine-imenu is an interactive Lisp function in `outshine.el'.
| 
| It is bound to M-# M-p.
| 
| (outshine-imenu &optional PREFER-IMENU-P)
| 
| Convenience function for calling imenu/idomenu from outshine.
`----

with idomenu installed from the package manager. 

-- 
cheers,
Thorsten

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  7:59   ` Thorsten Jolitz
@ 2014-09-03 18:40     ` Alan Schmitt
  2014-09-03 19:00       ` Thorsten Jolitz
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Schmitt @ 2014-09-03 18:40 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode

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

> I just tried it out - this 
>
> ,----
> | g  (org-refile t)
> `----
>
> works in Outshine like in Org when using the tj-outshine branch from the
> github repo, assuming you have
>
> ,----
> | (setq outshine-use-speed-commands t)
> `----
>
> in you init file. 

Ah, good to know.

> All 3 libs (outshine, outorg and navi-mode) have developed quite a bit
> recently, but I want to include better tests for outorg and implement
> most of Org-mode's user API (like e.g. org-refile) via the
> `outshine-use-outorg' function before I merge the tj-outshine, tj-outorg
> and tj-navi branches into their repective masters.
>
> Maybe you could switch to the git-versions?

OK, I gave it a try, and I'm now using them. I can already report that
the 'g' speed command does not work as expected. It seems to work (it
brings up a list of possible targets), but there are two issues.

1. The target does not include the current file, although I have this
   configuration:

#+begin_src emacs-lisp
(setq org-refile-targets
      '((my-todo-file :maxlevel . 10)
        (nil :maxlevel . 10)))
#+end_src

2. The current entry is actually refiled (instead of simply having the
   point move to the target).

Maybe I should look into doing this the navi way. Assume you want to
reach an entry with "foobar" in its title, but you don't know at what
level this entry is. How would you do it?

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03  8:28     ` Thorsten Jolitz
@ 2014-09-03 18:48       ` Alan Schmitt
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Schmitt @ 2014-09-03 18:48 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode

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

On 2014-09-03 10:28, Thorsten Jolitz <tjolitz@gmail.com> writes:

> ok, it seems 'outshine-refile does works, but I'm not sufficiently used
> to it - it actually refiles the outshine headers I'm on, but that seems
> to be a configuration thing. 

Oops, I should have read this first.

> to match you use case, but I think what you really want is
>
>
> ,----[ C-h f outshine-imenu RET ]
> | outshine-imenu is an interactive Lisp function in `outshine.el'.
> | 
> | It is bound to M-# M-p.
> | 
> | (outshine-imenu &optional PREFER-IMENU-P)
> | 
> | Convenience function for calling imenu/idomenu from outshine.
> `----
>
> with idomenu installed from the package manager. 

What I like about 'org-refile' is that it's integrated with my setup
(currently helm, but I'm also trying icicle). Is is possible to have
such an integration with outshine?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: navi equivalent to 'g' speed command?
  2014-09-03 18:40     ` Alan Schmitt
@ 2014-09-03 19:00       ` Thorsten Jolitz
  0 siblings, 0 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2014-09-03 19:00 UTC (permalink / raw)
  To: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

>> Maybe you could switch to the git-versions?
>
> OK, I gave it a try, and I'm now using them.

Thanks, that make things easier. 

> I can already report that the 'g' speed command does not work as
> expected. It seems to work (it brings up a list of possible targets),
> but there are two issues.
>
> 1. The target does not include the current file, although I have this
>    configuration:
>
> #+begin_src emacs-lisp
> (setq org-refile-targets
>       '((my-todo-file :maxlevel . 10)
>         (nil :maxlevel . 10)))
> #+end_src
>
> 2. The current entry is actually refiled (instead of simply having the
>    point move to the target).

As you can see when you look in the tj-outshine branch, I did a kind of
'industrial mass production of user-commands', i.e. I produced the
functions and the keybindings that port all Org commands to outshine
(using 'outshine-use-outorg'), but I did not have the time to check
them. Some might work out-of-the-box, others not, and other might not
make sense at all in Outshine. 

So I have to look at them one by one, and the next one I will check is
outshine-refile-targets, thx for your observations. 

> Maybe I should look into doing this the navi way. Assume you want to
> reach an entry with "foobar" in its title, but you don't know at what
> level this entry is. How would you do it?

As I wrote in my last mail, I think outshine-imenu (using idomenu, you
have to install that package for ido-style completion) does exacly what
you want - offer all file headers with smart completion, so you only
need to type 'foo' or so to get the "foobar" headline. Typing RET then
moves point to the headline.

-- 
cheers,
Thorsten

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

end of thread, other threads:[~2014-09-03 19:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03  6:51 navi equivalent to 'g' speed command? Alan Schmitt
2014-09-03  7:18 ` Thorsten Jolitz
2014-09-03  7:47   ` Alan Schmitt
2014-09-03  8:28     ` Thorsten Jolitz
2014-09-03 18:48       ` Alan Schmitt
2014-09-03  7:59   ` Thorsten Jolitz
2014-09-03 18:40     ` Alan Schmitt
2014-09-03 19:00       ` Thorsten Jolitz

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