Re: [O] navigate between source code blocks

2015-05-04 Thread Leo Ufimtsev


- Original Message -
> From: "Sebastien Vauban" 
> To: emacs-orgmode@gnu.org
> Sent: Monday, May 4, 2015 6:08:02 AM
> Subject: Re: [O] navigate between source code blocks
> 
> Leo Ufimtsev wrote:
> > There are some build in things also,
> >
> > E.g you can name source code blocks:
> > #+name: EDE Config
> > #+begin_src emacs-lisp
> > (require 'ede)
> > (global-ede-mode)
> > (load-file (concat user-emacs-directory "my/cedet-projects.el"))
> > #+end_src
> >
> > And then with Helm + org-babel-goto-named-src-block you can search
> > your named source code blocks.
> 
> Would you mind sharing your config for the above
> (Helm + org-babel-goto-named-src-block)?
> 

This is my .emacs.d folder, which I soft symlink:
ln -s ~/git/ldts/.emacs.d ~/.emacs.d
https://github.com/LeoUfimtsev/ldts/tree/master/.emacs.d

Of Some interest:
- init loader and customizations: (not so intresting)
https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/init.el

- legacy .emacs file which I haven't fully moved to my orgdotemacs (not as 
interesting)
https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/.emacs

- my org-babel-config:
https://github.com/LeoUfimtsev/ldts/blob/master/.emacs.d/my/orgdotemacs.org#org-babel-configuration

But truth be told, my config is somewhat messy with things all over the place. 
You may want to go with norangs's org-babel config, (I got my stuff from there 
also)
http://doc.norang.ca/org-mode.html#OrgBabel

Let me know if you have questions.

Thank you.

> Best regards,
>   Seb
> 
> --
> Sebastien Vauban
> 
> 
> 

-- 
Leo Ufimtsev | Intern Software Engineer @ Eclipse Team



Re: [O] navigate between source code blocks

2015-05-04 Thread Leo Ufimtsev


- Original Message -
> From: "Oleh Krehel" 
> To: "Leo Ufimtsev" 
> Cc: emacs-orgmode@gnu.org, "Zhihao Ding" 
> Sent: Friday, May 1, 2015 11:13:28 AM
> Subject: Re: [O] navigate between source code blocks
> 
> Leo Ufimtsev  writes:
> 
> >>And it's got the best Helm implementation for navigating to
> > headings.
> >
> > Well, when I hear someone use the word 'best', I see it as a challenge X-D.
> >
> > I used worf-goto for a while. It's certainly amazing and on the odd
> > occasion I still use it, but lately I've switched over to:
> > helm-org-in-buffer-headings
> >
> > The difference is that worf-goto only looks at the specific headings (e.g
> > the line it self), where as helm-org-in-buffer-headings searches the whole
> > hierarchy.
> >
> > E.g if I have a structure like this:
> >
> > * Gdb
> > ** Break
> > *** on line  (1)
> > *** on function
> > * Eclipse
> > ** Break
> > *** on line
> > *** on function
> >
> > And I search for "gdb break line", then I will not get a match with
> > worf-goto, but helm-org-in-buffer-headings does do a match on (1).
> >
> > For example in the attached screenshot I search for "gdb cmd break". It's
> > also smart enough to trim long headings.
> >
> > This is particularly useful for finding the deeply nested sub-items.
> >
> > from what I gather, worf doesn't have an equivalent:
> > https://github.com/abo-abo/worf/blob/master/worf.el
> > Imho it would benefit from having something of that sort in the
> > package.
> 
> Thanks for the feedback, Leo. It's doable, but then it would be pretty
> much identical to helm-org-in-buffer-headings.  If you or anyone else is
> interested, post at https://github.com/abo-abo/worf/issues.
> 
> >> It just takes vi-style "hjkl" arrows, because
> > Emacs-style "bnpf" arrows aren't convenient.
> >
> > Well, I use the Colemak layout, so hjkl is actually not very
> > convenient for me :-/. Meh.
> 
> Well, it's always something, isn't it :)
> 
> By the way, I'm trying to go with general-purpose tools these days.
> Here's a link to the search that you mentioned using swiper:
> http://oremacs.com/download/org-mode-swiper.png.
> 
> Swiper is an isearch replacement, so I could just:
> 
> 1. "C-s" break -> see 38 matches.
> 2. "C-a" \* "SPC" -> see 9 matches.
> 3. "C-n" repeatedly to navigate to the one that I want.

I've been meaning to try swiper for a while, I've sort of been waiting for it 
to mature a bit. 
I'll try the suggestion above sometime, maybe on a thursday evening after work 
X-D.


> As you see, I kind of stole your notes and the org-bullets
> customization, so thanks for that:)

I am impressed at your finding-emacs-configs-online skills =).

> Oleh
> 

-- 
Leo Ufimtsev | Intern Software Engineer @ Eclipse Team



Re: [O] navigate between source code blocks

2015-05-04 Thread Sebastien Vauban
Leo Ufimtsev wrote:
> There are some build in things also, 
>
> E.g you can name source code blocks:
> #+name: EDE Config
> #+begin_src emacs-lisp
> (require 'ede)
> (global-ede-mode)
> (load-file (concat user-emacs-directory "my/cedet-projects.el"))
> #+end_src
>
> And then with Helm + org-babel-goto-named-src-block you can search
> your named source code blocks.

Would you mind sharing your config for the above
(Helm + org-babel-goto-named-src-block)?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] navigate between source code blocks

2015-05-01 Thread Oleh Krehel
Leo Ufimtsev  writes:

>>And it's got the best Helm implementation for navigating to
> headings.
>
> Well, when I hear someone use the word 'best', I see it as a challenge X-D.
>
> I used worf-goto for a while. It's certainly amazing and on the odd occasion 
> I still use it, but lately I've switched over to: helm-org-in-buffer-headings
>
> The difference is that worf-goto only looks at the specific headings (e.g the 
> line it self), where as helm-org-in-buffer-headings searches the whole 
> hierarchy. 
>
> E.g if I have a structure like this:
>
> * Gdb 
> ** Break 
> *** on line  (1)
> *** on function 
> * Eclipse
> ** Break
> *** on line
> *** on function 
>
> And I search for "gdb break line", then I will not get a match with 
> worf-goto, but helm-org-in-buffer-headings does do a match on (1).
>
> For example in the attached screenshot I search for "gdb cmd break". It's 
> also smart enough to trim long headings.
>
> This is particularly useful for finding the deeply nested sub-items.
>
> from what I gather, worf doesn't have an equivalent:
> https://github.com/abo-abo/worf/blob/master/worf.el
> Imho it would benefit from having something of that sort in the
> package.

Thanks for the feedback, Leo. It's doable, but then it would be pretty
much identical to helm-org-in-buffer-headings.  If you or anyone else is
interested, post at https://github.com/abo-abo/worf/issues.

>> It just takes vi-style "hjkl" arrows, because
> Emacs-style "bnpf" arrows aren't convenient.
>
> Well, I use the Colemak layout, so hjkl is actually not very
> convenient for me :-/. Meh.

Well, it's always something, isn't it :)

By the way, I'm trying to go with general-purpose tools these days.
Here's a link to the search that you mentioned using swiper:
http://oremacs.com/download/org-mode-swiper.png.

Swiper is an isearch replacement, so I could just:

1. "C-s" break -> see 38 matches.
2. "C-a" \* "SPC" -> see 9 matches.
3. "C-n" repeatedly to navigate to the one that I want.

As you see, I kind of stole your notes and the org-bullets
customization, so thanks for that:)

Oleh



Re: [O] navigate between source code blocks

2015-05-01 Thread Leo Ufimtsev
>And it's got the best Helm implementation for navigating to
headings.

Well, when I hear someone use the word 'best', I see it as a challenge X-D.

I used worf-goto for a while. It's certainly amazing and on the odd occasion I 
still use it, but lately I've switched over to: helm-org-in-buffer-headings

The difference is that worf-goto only looks at the specific headings (e.g the 
line it self), where as helm-org-in-buffer-headings searches the whole 
hierarchy. 

E.g if I have a structure like this:

* Gdb 
** Break 
*** on line  (1)
*** on function 
* Eclipse
** Break
*** on line
*** on function 

And I search for "gdb break line", then I will not get a match with worf-goto, 
but helm-org-in-buffer-headings does do a match on (1).

For example in the attached screenshot I search for "gdb cmd break". It's also 
smart enough to trim long headings.

This is particularly useful for finding the deeply nested sub-items.

from what I gather, worf doesn't have an equivalent:
https://github.com/abo-abo/worf/blob/master/worf.el
Imho it would benefit from having something of that sort in the package. 

> It just takes vi-style "hjkl" arrows, because
Emacs-style "bnpf" arrows aren't convenient.

Well, I use the Colemak layout, so hjkl is actually not very convenient for me 
:-/. Meh. 

Leo Ufimtsev | Intern Software Engineer @ Eclipse Team


- Original Message -
From: "Oleh Krehel" 
To: "Leo Ufimtsev" 
Cc: emacs-orgmode@gnu.org, "Zhihao Ding" 
Sent: Thursday, April 30, 2015 1:25:45 PM
Subject: Re: [O] navigate between source code blocks

Leo Ufimtsev  writes:

> Worf I think is a bit on the vi side of things. Helm is more generic.

Worf is as much on the vi side of things, as `org-use-speed-commands'
are. Almost not at all. It just takes vi-style "hjkl" arrows, because
Emacs-style "bnpf" arrows aren't convenient.

And it's got the best Helm implementation for navigating to
headings. I've just added named blocks to this list as well.
Screenshot: http://oremacs.com/download/worf-goto.png.
The command to call is "M-x" `worf-goto' or "g" while in `worf-mode'.

Oleh



Re: [O] navigate between source code blocks

2015-05-01 Thread Zhihao Ding
Thank guys. Wolf is new to me and I am trying it now, it already feels 
very attractive! This increases my navigation efficiency quite a bit!  

Zhihao


> On 30 Apr 2015, at 18:25, Oleh Krehel  wrote:
> 
> Leo Ufimtsev  writes:
> 
>> Worf I think is a bit on the vi side of things. Helm is more generic.
> 
> Worf is as much on the vi side of things, as `org-use-speed-commands'
> are. Almost not at all. It just takes vi-style "hjkl" arrows, because
> Emacs-style "bnpf" arrows aren't convenient.
> 
> And it's got the best Helm implementation for navigating to
> headings. I've just added named blocks to this list as well.
> Screenshot: http://oremacs.com/download/worf-goto.png.
> The command to call is "M-x" `worf-goto' or "g" while in `worf-mode'.
> 
> Oleh




Re: [O] navigate between source code blocks

2015-04-30 Thread Oleh Krehel
Leo Ufimtsev  writes:

> Worf I think is a bit on the vi side of things. Helm is more generic.

Worf is as much on the vi side of things, as `org-use-speed-commands'
are. Almost not at all. It just takes vi-style "hjkl" arrows, because
Emacs-style "bnpf" arrows aren't convenient.

And it's got the best Helm implementation for navigating to
headings. I've just added named blocks to this list as well.
Screenshot: http://oremacs.com/download/worf-goto.png.
The command to call is "M-x" `worf-goto' or "g" while in `worf-mode'.

Oleh



Re: [O] navigate between source code blocks

2015-04-30 Thread Leo Ufimtsev
There are some build in things also, 

E.g you can name source code blocks:
#+name: EDE Config
#+begin_src emacs-lisp
(require 'ede)
(global-ede-mode)
(load-file (concat user-emacs-directory "my/cedet-projects.el"))
#+end_src

And then with Helm + org-babel-goto-named-src-block you can search your named 
source code blocks. 

You can also go to the next source code block via org-babel-next-src-block etc. 
Just to hop around. There is also a command for marking blocks.

Worf I think is a bit on the vi side of things. Helm is more generic.

I usually do things like append 'src' to the title of a heading and then do a 
helm-heading search to find my source code.

Leo Ufimtsev | Intern Software Engineer @ Eclipse Team


- Original Message -
From: "Zhihao Ding" 
To: "Oleh Krehel" 
Cc: emacs-orgmode@gnu.org
Sent: Wednesday, April 29, 2015 4:20:06 AM
Subject: Re: [O] navigate between source code blocks

Thanks very much Oleh. 

Best,
Zhihao


> On 28 Apr 2015, at 08:22, Oleh Krehel  wrote:
> 
> Hi Zhihao,
> 
>> I’ve got a simple question: how to speed up jumping
>> between code blocks?
> 
> You might be interested in https://github.com/abo-abo/worf.
> It allows you to traverse anything that starts with "*" or "#+" with
> just "hjkl" keys.
> See the docs here: http://oremacs.com/worf/README.html.
> 
> regards,
> Oleh




Re: [O] navigate between source code blocks

2015-04-29 Thread Zhihao Ding
Thanks very much Oleh. 

Best,
Zhihao


> On 28 Apr 2015, at 08:22, Oleh Krehel  wrote:
> 
> Hi Zhihao,
> 
>> I’ve got a simple question: how to speed up jumping
>> between code blocks?
> 
> You might be interested in https://github.com/abo-abo/worf.
> It allows you to traverse anything that starts with "*" or "#+" with
> just "hjkl" keys.
> See the docs here: http://oremacs.com/worf/README.html.
> 
> regards,
> Oleh



Re: [O] navigate between source code blocks

2015-04-28 Thread Oleh Krehel
Hi Zhihao,

> I’ve got a simple question: how to speed up jumping
> between code blocks?

You might be interested in https://github.com/abo-abo/worf.
It allows you to traverse anything that starts with "*" or "#+" with
just "hjkl" keys.
See the docs here: http://oremacs.com/worf/README.html.

regards,
Oleh



[O] navigate between source code blocks

2015-04-27 Thread Zhihao Ding
Dear Org experts, 

I’ve got a simple question: how to speed up jumping 
between code blocks? 

My org file grows larger every day with more and more
source code blocks. I find myself spending increasing 
amount of time finding the right code blocks to go to. 

Could anyone suggest a method to increase efficiency?
So far I’ve tried (1)  simple search and (2) C-c C-v g, 
which for some reason often fails to find blocks. 

Thanks very much!

Zhihao