Re: [O] headline navigation and refiling.

2011-10-06 Thread Carsten Dominik

On Oct 6, 2011, at 10:28 AM, Carsten Dominik wrote:

> 
> On Oct 5, 2011, at 5:43 PM, Dave Abrahams wrote:
> 
>> 
>> on Wed Oct 05 2011, Le Wang  wrote:
>> 
>>> But doesn't the fact that a user didn't know he could navigate with
>>> org-refile speak laudly for refactoring it into its own key-stroke?
> 
> We already have that:
> 
> (setq org-goto-max-level 10)
> (setq org-goto-interface 'outline-path-completion)

Maybe you also want

(setq org-outline-path-complete-in-steps nil)

- Carsten

> 
> The use the key `C-c C-j'.
> 
> Right now this uses te outline-path-completion of refile,
> if you want the vanilla refile interface, I would have to make a few
> small changes.
> 
> - Carsten
> 
> 
> 

- Carsten






Re: [O] headline navigation and refiling.

2011-10-06 Thread Carsten Dominik

On Oct 5, 2011, at 5:43 PM, Dave Abrahams wrote:

> 
> on Wed Oct 05 2011, Le Wang  wrote:
> 
>> But doesn't the fact that a user didn't know he could navigate with
>> org-refile speak laudly for refactoring it into its own key-stroke?

We already have that:

(setq org-goto-max-level 10)
(setq org-goto-interface 'outline-path-completion)

The use the key `C-c C-j'.

Right now this uses te outline-path-completion of refile,
if you want the vanilla refile interface, I would have to make a few
small changes.

- Carsten






Re: [O] headline navigation and refiling.

2011-10-06 Thread Carsten Dominik

On Oct 6, 2011, at 9:34 AM, Tom wrote:

> Carsten Dominik  gmail.com> writes:
>> 
>>> Not a part of org, but I think this occur based library is brilliant:
>>> 
>> 
>> This is good and should be part of Org-mode.  Anyone knows who wrote this?
>> 
> 
> I wrote it, but this shouldn't be the part of Org, because it's a
> hack and I don't want to deal with copyright papers either
> for such a trivial package (I've written it in half an hour, so
> it's not very hard to reimplement it).
> 
> It's a hack, because it should not use occur at all. Occur is
> line oriented and the search should be able to treat an org
> headline and its text as a single entity when searching.
> 
> So it should be reimplemented from the ground up properly with the
> same dynamic interface, so that results are shown immediately as the
> user is typing, but it should be able to support the same boolean
> logic as org-search-view, so one can make intelligent searches with
> it.
> 
> 
> For example, +dog +wag should find headings like this
> 
> * the usual behavior of dogs
> 
> they wag their tails
> 
> 
> And the search output should show the matching heading and below
> that that part of the text which is matching and if possible it
> should color the matches (like in the occur output), so in the
> above case it would show something like this (with _ indicating
> coloring):
> 
> * the usual behavior of _dogs_
> they _wag_ their tails
> 
> 
> That's the version org should have included.
Fair enough.

- Carsten

> 
> 
> 

- Carsten






Re: [O] headline navigation and refiling.

2011-10-06 Thread Tom
Carsten Dominik  gmail.com> writes:
>
> > Not a part of org, but I think this occur based library is brilliant:
> > 
> 
> This is good and should be part of Org-mode.  Anyone knows who wrote this?
> 

I wrote it, but this shouldn't be the part of Org, because it's a
hack and I don't want to deal with copyright papers either
for such a trivial package (I've written it in half an hour, so
it's not very hard to reimplement it).

It's a hack, because it should not use occur at all. Occur is
line oriented and the search should be able to treat an org
headline and its text as a single entity when searching.

So it should be reimplemented from the ground up properly with the
same dynamic interface, so that results are shown immediately as the
user is typing, but it should be able to support the same boolean
logic as org-search-view, so one can make intelligent searches with
it.


For example, +dog +wag should find headings like this

* the usual behavior of dogs

they wag their tails


And the search output should show the matching heading and below
that that part of the text which is matching and if possible it
should color the matches (like in the occur output), so in the
above case it would show something like this (with _ indicating
coloring):

* the usual behavior of _dogs_
they _wag_ their tails


That's the version org should have included.





Re: [O] headline navigation and refiling.

2011-10-05 Thread Memnon Anon
Le Wang  writes:

>  Use the C-u (universal prefix) to `org-refile', i.e. C-u C-c C-w.

How could I miss that?!
Woohooo! 

Thanks,
Memnon






Re: [O] headline navigation and refiling.

2011-10-05 Thread Le Wang
On Wed, Oct 5, 2011 at 11:43 PM, Dave Abrahams  wrote:
>
> on Wed Oct 05 2011, Le Wang  wrote:
>
>> But doesn't the fact that a user didn't know he could navigate with
>> org-refile speak laudly for refactoring it into its own key-stroke?
>
> So... is anyone going to clue me in?

So sorry, I thought it was answered.  Use the C-u (universal prefix)
to `org-refile', i.e. C-u C-c C-w.


-- 
Le



Re: [O] headline navigation and refiling.

2011-10-05 Thread Dave Abrahams

on Wed Oct 05 2011, Le Wang  wrote:

> But doesn't the fact that a user didn't know he could navigate with
> org-refile speak laudly for refactoring it into its own key-stroke?

So... is anyone going to clue me in?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




Re: [O] headline navigation and refiling.

2011-10-05 Thread Suvayu Ali
Hi Carsten,

On Wed, 5 Oct 2011 16:34:20 +0200
Carsten Dominik  wrote:

> > Not a part of org, but I think this occur based library is
> > brilliant:   
> 
> This is good and should be part of Org-mode.  Anyone knows who wrote
> this?
> 

This was writetn by Tom (I don't know his last name).



> - Carsten


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] headline navigation and refiling.

2011-10-05 Thread Michael Brand
On Wed, Oct 5, 2011 at 16:54, Carsten Dominik  wrote:
>> The same also for the whole set of all agenda files similar to "C-c a
>> /" would be even better.
>
> Care to make the necessary changes?

It was only a suggestion, I'll prefer to start on other of my
someday/maybe Org things more important to me.

Michael



Re: [O] headline navigation and refiling.

2011-10-05 Thread Le Wang
On Wed, Oct 5, 2011 at 10:31 PM, Carsten Dominik
 wrote:
>
> On 5.10.2011, at 12:05, Le Wang wrote:
>
>> Hi all,
>>
>> I like using the org-refile interface to navigate.  It's very
>> intuitive to me.  But I want to navigate to headlines deeper than my
>> org-refile-target :max-level.  Is there anything to do other than
>> rolling my own?  I can see wouldn't be hard.
>
> You can write a little wrapper and set a special value for the refile targets:
>
> (defun my-goto-with-refile ()
>  (interactive)
>  (let ((org-refile-targets '((nil . (:maxlevel . 10)
>    (org-refile t)))

Yes, this is what I had in mind.

>> It feels headline navigation was just bolted onto org-refile.
>
> THis is how this happened, historically.

Okay, that's fine.  But doesn't the fact that a user didn't know he
could navigate with org-refile speak laudly for refactoring it into
its own key-stroke?

The audience of org-mode is growing larger than just emacs hackers or
even emacs users, as I hear of people coming to Emacs just for
org-mode all the time.  So this universal arg bolt-on for such an
important piece of functionality should be up for discussion.

> - Carsten

-- 
Le



Re: [O] headline navigation and refiling.

2011-10-05 Thread Carsten Dominik

On 5.10.2011, at 16:50, Michael Brand wrote:

> Hi Carsten
> 
> On Wed, Oct 5, 2011 at 16:34, Carsten Dominik  
> wrote:
>> On 5.10.2011, at 13:02, suvayu ali wrote:
>>> Not a part of org, but I think this occur based library is brilliant:
>>> 
>> 
>> This is good and should be part of Org-mode.
> 
> +1
> 
> The same also for the whole set of all agenda files similar to "C-c a
> /" would be even better.

Care to make the necessary changes?

- Carsten

> 
>> Anyone knows who wrote this?
> 
> I took it from Tom's original post
> http://thread.gmane.org/gmane.emacs.orgmode/41172
> 
> Michael




Re: [O] headline navigation and refiling.

2011-10-05 Thread Michael Brand
Hi Carsten

On Wed, Oct 5, 2011 at 16:34, Carsten Dominik  wrote:
> On 5.10.2011, at 13:02, suvayu ali wrote:
>> Not a part of org, but I think this occur based library is brilliant:
>> 
>
> This is good and should be part of Org-mode.

+1

The same also for the whole set of all agenda files similar to "C-c a
/" would be even better.

> Anyone knows who wrote this?

I took it from Tom's original post
http://thread.gmane.org/gmane.emacs.orgmode/41172

Michael



Re: [O] headline navigation and refiling.

2011-10-05 Thread Carsten Dominik

On 5.10.2011, at 13:02, suvayu ali wrote:

> On Wed, Oct 5, 2011 at 12:05 PM, Le Wang  wrote:
>> I like using the org-refile interface to navigate.  It's very
>> intuitive to me.  But I want to navigate to headlines deeper than my
>> org-refile-target :max-level.  Is there anything to do other than
>> rolling my own?  I can see wouldn't be hard.
>> 
>> It feels headline navigation was just bolted onto org-refile.  Should
>> they really be the same command?
>> 
> 
> Not a part of org, but I think this occur based library is brilliant:
> 

This is good and should be part of Org-mode.  Anyone knows who wrote this?

- Carsten

> 
>> --
>> Le
> 
> HTH
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 




Re: [O] headline navigation and refiling.

2011-10-05 Thread Carsten Dominik

On 5.10.2011, at 12:05, Le Wang wrote:

> Hi all,
> 
> I like using the org-refile interface to navigate.  It's very
> intuitive to me.  But I want to navigate to headlines deeper than my
> org-refile-target :max-level.  Is there anything to do other than
> rolling my own?  I can see wouldn't be hard.

You can write a little wrapper and set a special value for the refile targets:

(defun my-goto-with-refile ()
  (interactive)
  (let ((org-refile-targets '((nil . (:maxlevel . 10)
(org-refile t)))


> 
> It feels headline navigation was just bolted onto org-refile.

THis is how this happened, historically.

>  Should they really be the same command?

Why not?

- Carsten



> 
> -- 
> Le
> 




Re: [O] headline navigation and refiling.

2011-10-05 Thread Dave Abrahams

on Wed Oct 05 2011, Le Wang  wrote:

> Hi all,
>
> I like using the org-refile interface to navigate.  

Without actually refiling?  How do you do that?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




Re: [O] headline navigation and refiling.

2011-10-05 Thread suvayu ali
On Wed, Oct 5, 2011 at 12:05 PM, Le Wang  wrote:
> I like using the org-refile interface to navigate.  It's very
> intuitive to me.  But I want to navigate to headlines deeper than my
> org-refile-target :max-level.  Is there anything to do other than
> rolling my own?  I can see wouldn't be hard.
>
> It feels headline navigation was just bolted onto org-refile.  Should
> they really be the same command?
>

Not a part of org, but I think this occur based library is brilliant:


> --
> Le

HTH

-- 
Suvayu

Open source is the future. It sets us free.



[O] headline navigation and refiling.

2011-10-05 Thread Le Wang
Hi all,

I like using the org-refile interface to navigate.  It's very
intuitive to me.  But I want to navigate to headlines deeper than my
org-refile-target :max-level.  Is there anything to do other than
rolling my own?  I can see wouldn't be hard.

It feels headline navigation was just bolted onto org-refile.  Should
they really be the same command?

-- 
Le