Feature request for Helm-org-headline

40 views
Skip to first unread message

Sebastien Vauban

unread,
Mar 20, 2014, 11:51:45 AM3/20/14
to emacs...@googlegroups.com
Hello,

I use a lot `Helm-org-headline', and think that its output could be
highly improved with a tiny presentation detail, that is, instead of
reporting an hypothetical structure as:

13:H1:Chapter I
17:H2:Chapter I / Section A
22:H3:Chapter I / Section A / Subsection 1
41:H3:Chapter I / Section A / Subsection 1

Do it as:

13: * Chapter I
17: ** Chapter I / Section A
22: *** Chapter I / Section A / Subsection 1
41: *** Chapter I / Section A / Subsection 1

IOW, replace "H1/H2/H3" by "*/**/***".

WDYT?

Best regards,
Seb

--
Sebastien Vauban

Thierry Volpiatto

unread,
Mar 22, 2014, 4:14:44 AM3/22/14
to emacs...@googlegroups.com
I don't support anymore helm-org.el.

--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

Sebastien Vauban

unread,
Mar 22, 2014, 5:38:26 AM3/22/14
to emacs...@googlegroups.com
Thierry Volpiatto wrote:
> Sebastien Vauban <sva-...@mygooglest.com> writes:
>> I use a lot `Helm-org-headline', and think that its output could be
>> highly improved with a tiny presentation detail, that is, instead of
>> reporting an hypothetical structure as:
>>
>> 13:H1:Chapter I
>> 17:H2:Chapter I / Section A
>> 22:H3:Chapter I / Section A / Subsection 1
>> 41:H3:Chapter I / Section A / Subsection 1
>>
>> Do it as:
>>
>> 13: * Chapter I
>> 17: ** Chapter I / Section A
>> 22: *** Chapter I / Section A / Subsection 1
>> 41: *** Chapter I / Section A / Subsection 1
>>
>> IOW, replace "H1/H2/H3" by "*/**/***".
>>
>> WDYT?
>
> I don't support anymore helm-org.el.

Does someone else do it?

If not, could you just give me some hints about which functions I should
look at to try to make the modification? I never saw where those
H1/H2/H3 strings were written, where the "string line" is constructed.

Thierry Volpiatto

unread,
Mar 22, 2014, 6:24:18 AM3/22/14
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> Thierry Volpiatto wrote:
>> Sebastien Vauban <sva-...@mygooglest.com> writes:
>>> I use a lot `Helm-org-headline', and think that its output could be
>>> highly improved with a tiny presentation detail, that is, instead of
>>> reporting an hypothetical structure as:
>>>
>>> 13:H1:Chapter I
>>> 17:H2:Chapter I / Section A
>>> 22:H3:Chapter I / Section A / Subsection 1
>>> 41:H3:Chapter I / Section A / Subsection 1
>>>
>>> Do it as:
>>>
>>> 13: * Chapter I
>>> 17: ** Chapter I / Section A
>>> 22: *** Chapter I / Section A / Subsection 1
>>> 41: *** Chapter I / Section A / Subsection 1
>>>
>>> IOW, replace "H1/H2/H3" by "*/**/***".
>>>
>>> WDYT?
>>
>> I don't support anymore helm-org.el.
>
> Does someone else do it?

No.

> If not, could you just give me some hints about which functions I should
> look at to try to make the modification? I never saw where those
> H1/H2/H3 strings were written, where the "string line" is constructed.

See helm-headline-get-candidates, find the line:

(format "H%d:%s" (1+ hierarchy)

use instead something like:

(format "%s:%s" (make-string (1+ hierarchy) ?*)

Le Wang

unread,
Mar 22, 2014, 6:51:20 AM3/22/14
to emacs...@googlegroups.com
Why do you need the stars at all?

Org has native go to heading with `C-u C-c C-w`.
> --
> You received this message because you are subscribed to the Google Groups "emacs-helm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to emacs-helm+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Le

Sebastien Vauban

unread,
Mar 24, 2014, 7:07:45 AM3/24/14
to emacs...@googlegroups.com
Le Wang wrote:
> On Sat, Mar 22, 2014 at 6:24 AM, Thierry Volpiatto wrote:
>> Sebastien Vauban <sva-...@mygooglest.com> writes:
>>> Thierry Volpiatto wrote:
>>>> Sebastien Vauban <sva-...@mygooglest.com> writes:
>>>>> I use a lot `Helm-org-headline', and think that its output could be
>>>>> highly improved with a tiny presentation detail, that is, instead of
>>>>> reporting an hypothetical structure as:
>>>>>
>>>>> 13:H1:Chapter I
>>>>> 17:H2:Chapter I / Section A
>>>>> 22:H3:Chapter I / Section A / Subsection 1
>>>>> 41:H3:Chapter I / Section A / Subsection 1
>>>>>
>>>>> Do it as:
>>>>>
>>>>> 13: * Chapter I
>>>>> 17: ** Chapter I / Section A
>>>>> 22: *** Chapter I / Section A / Subsection 1
>>>>> 41: *** Chapter I / Section A / Subsection 1
>>>>>
>>>>> IOW, replace "H1/H2/H3" by "*/**/***".
>>
>> See helm-headline-get-candidates, find the line:
>>
>> (format "H%d:%s" (1+ hierarchy)
>>
>> use instead something like:
>>
>> (format "%s:%s" (make-string (1+ hierarchy) ?*)

Thanks a lot for your answer!!

For the sake of clarity, I'd remove the `:' character from the display:

(format "%s %s" (make-string (1+ hierarchy) ?*)

Can you commit that, please?

> Why do you need the stars at all?

To show the lines in a similar way as what they are in the Org
buffer. In fact, exactly as they are for all H1 headlines, and similar
for all the others (prefix of parent headlines added).

> Org has native go to heading with `C-u C-c C-w`.

I don't understand. That has nothing to do with `Helm-org-headline'!?

╭────
│ C-c C-w runs the command org-refile, which is an interactive Lisp function in
│ `org.el'.

│ (org-refile &optional ARG DEFAULT-BUFFER RFLOC MSG)

│ Move the entry or entries at point to another heading. [...]

│ With prefix arg ARG, the command will only visit the target
│ location and not actually move anything.
╰────

With `C-u C-c C-w', you go to one specific file and place that you
construct interactively by adding components to the path.

Here, with `Helm-org-headline', you see all headlines (in your current
Org buffer only) which match a specific pattern (for example, all
headlines which have the "test" string in them). Similar to `occur',
but limited to the headlines.

Thierry Volpiatto

unread,
Mar 24, 2014, 8:49:51 AM3/24/14
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> For the sake of clarity, I'd remove the `:' character from the display:
>
> (format "%s %s" (make-string (1+ hierarchy) ?*)
>
> Can you commit that, please?

Send a pull request please.
Reply all
Reply to author
Forward
0 new messages