Re: [O] convert a simple list of lines each to a orgmode header

2015-10-01 Thread Thierry Banel

  
  
No problem, this thread was useful:
  I learned C-c * and C-c - on region.
  
  Le 29/09/2015 15:13, Kaushal Modi a écrit :


  
Christian is correct.


Selecting a region and doing
  `C-c *` *does* work. Please ignore my earlier email. I mixed
  up some command in org that did not work over region with `C-c
  *` :)



  


  

  


  




Re: [O] convert a simple list of lines each to a orgmode header

2015-10-01 Thread Kaushal Modi
Thanks Nick, I confirmed later that `C-c *` worked over region for me too.


--
Kaushal Modi

On Tue, Sep 29, 2015 at 9:27 PM, Nick Dokos  wrote:

> Kaushal Modi  writes:
>
> > I realized that the default binding `C-c *` works only on the current
> line, not the whole selection (and the same applies to the opposite `C-c
> -`).
> >
> > It would be great to have those commands work over a region too.
> >
>
> I don't think that's right - at least, when I tried it with a region, it
> worked. I just didn't know about it (or, more likely, didn't remember it)
> before Christian mentioned it.
>
> The docstring for the function says:
>
> ,
> | org-toggle-heading is an interactive Lisp function in
> | ‘../org-mode/lisp/org.el’.
> |
> | (org-toggle-heading  NSTARS)
> |
> | Convert headings to normal text, or items or text to headings.
> | If there is no active region, only convert the current line.
> `
>
> Is transient mark mode enabled? I think it's enabled by default
> nowadays, but maybe you turned it off?
>
> Nick
>
>
>
>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-30 Thread Xebar Saram
C-c * is perfect!

thx so much

z

On Tue, Sep 29, 2015 at 11:00 AM, Michael Strey  wrote:

> On Mo, 2015-09-28 at 18:52, Xebar Saram wrote:
>
> > im looking for a simple way to convert a simple list of lines (i can
> > mark it first if needed) each to a orgmode header
> > anyone has such a way?
>
> Mark the region and press C-c *.
>
> --
> Michael Strey
> http://www.strey.biz * https://twitter.com/michaelstrey
>
>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-30 Thread Nick Dokos
Kaushal Modi  writes:

> I realized that the default binding `C-c *` works only on the current line, 
> not the whole selection (and the same applies to the opposite `C-c -`).
>
> It would be great to have those commands work over a region too.
>

I don't think that's right - at least, when I tried it with a region, it
worked. I just didn't know about it (or, more likely, didn't remember it)
before Christian mentioned it.

The docstring for the function says:

,
| org-toggle-heading is an interactive Lisp function in
| ‘../org-mode/lisp/org.el’.
| 
| (org-toggle-heading  NSTARS)
| 
| Convert headings to normal text, or items or text to headings.
| If there is no active region, only convert the current line.
`

Is transient mark mode enabled? I think it's enabled by default
nowadays, but maybe you turned it off?

Nick






Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Manuel Koell
I know how to do in vim. Select all text and hit I (uppercase i), then
start type.
There is also a way in emacs, but I never tried before:

https://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/Rectangles.html

2015-09-29 5:30 GMT+02:00 Nick Dokos :

> Xebar Saram  writes:
>
> > Hi all
> >
> > im looking for a simple way to convert a simple list of lines (i can
> > mark it first if needed) each to a orgmode header anyone has such a
> > way?
> >
>
> Maybe I'm missing something, but can't you just add asterisks in front
> of each line? Maybe with a keyboard macro? Or even a sed script?
>
> There's a reason that org files are plain text.
>
> Nick
>
>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Eric S Fraga
On Monday, 28 Sep 2015 at 19:52, Xebar Saram wrote:
> Hi all
>
> im looking for a simple way to convert a simple list of lines (i can mark
> it first if needed) each to a orgmode header
> anyone has such a way?

Mark the region and then: M-% ^  * SPC  

The power of org: it's all text (tm)!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.1-203-g4ca3d3



Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Michael Strey
On Mo, 2015-09-28 at 18:52, Xebar Saram wrote:

> im looking for a simple way to convert a simple list of lines (i can
> mark it first if needed) each to a orgmode header
> anyone has such a way?

Mark the region and press C-c *.

-- 
Michael Strey
http://www.strey.biz * https://twitter.com/michaelstrey




Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Christian Moe

> Xebar Saram  writes:
>
>> Hi all
>>
>> im looking for a simple way toconvert a simple list of lines (i can
>> mark it first if needed) each to a orgmode header anyone has such a
>> way?
>>
>
> Maybe I'm missing something, but can't you just add asterisks in front
> of each line? Maybe with a keyboard macro? Or even a sed script?
>
> There's a reason that org files are plain text.
>
> Nick

Mark the region and do `C-c *'?

Yours,
Christian




Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Xebar Saram
Hi Nick

well yes i guess :) . but would be cool if this small function was org
aware and thus the asteriks (org header) level would be auto set to the
current sub level.

thx

z

On Tue, Sep 29, 2015 at 6:30 AM, Nick Dokos  wrote:

> Xebar Saram  writes:
>
> > Hi all
> >
> > im looking for a simple way to convert a simple list of lines (i can
> > mark it first if needed) each to a orgmode header anyone has such a
> > way?
> >
>
> Maybe I'm missing something, but can't you just add asterisks in front
> of each line? Maybe with a keyboard macro? Or even a sed script?
>
> There's a reason that org files are plain text.
>
> Nick
>
>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Kaushal Modi
Christian is correct.

Selecting a region and doing `C-c *` *does* work. Please ignore my earlier
email. I mixed up some command in org that did not work over region with
`C-c *` :)



--
Kaushal Modi

On Tue, Sep 29, 2015 at 3:17 AM, Manuel Koell  wrote:

> I know how to do in vim. Select all text and hit I (uppercase i), then
> start type.
> There is also a way in emacs, but I never tried before:
>
> https://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/Rectangles.html
>
> 2015-09-29 5:30 GMT+02:00 Nick Dokos :
>
>> Xebar Saram  writes:
>>
>> > Hi all
>> >
>> > im looking for a simple way to convert a simple list of lines (i can
>> > mark it first if needed) each to a orgmode header anyone has such a
>> > way?
>> >
>>
>> Maybe I'm missing something, but can't you just add asterisks in front
>> of each line? Maybe with a keyboard macro? Or even a sed script?
>>
>> There's a reason that org files are plain text.
>>
>> Nick
>>
>>
>>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-29 Thread Kaushal Modi
I realized that the default binding `C-c *` works only on the current line,
not the whole selection (and the same applies to the opposite `C-c -`).

It would be great to have those commands work over a region too.

But in the meanwhile, you can do either of the below:

- Simply select the region and use `query-replace-regexp`.
- Use a combination of keyboard macros and `C-c *`.
- Use `multiple-cursors`.
- Any other multiple editing method you might prefer.

--
Kaushal Modi
On Sep 29, 2015 6:06 AM, "Xebar Saram"  wrote:

> Hi Nick
>
> well yes i guess :) . but would be cool if this small function was org
> aware and thus the asteriks (org header) level would be auto set to the
> current sub level.
>
> thx
>
> z
>
> On Tue, Sep 29, 2015 at 6:30 AM, Nick Dokos  wrote:
>
>> Xebar Saram  writes:
>>
>> > Hi all
>> >
>> > im looking for a simple way to convert a simple list of lines (i can
>> > mark it first if needed) each to a orgmode header anyone has such a
>> > way?
>> >
>>
>> Maybe I'm missing something, but can't you just add asterisks in front
>> of each line? Maybe with a keyboard macro? Or even a sed script?
>>
>> There's a reason that org files are plain text.
>>
>> Nick
>>
>>
>>
>


Re: [O] convert a simple list of lines each to a orgmode header

2015-09-28 Thread Nick Dokos
Xebar Saram  writes:

> Hi all
>
> im looking for a simple way to convert a simple list of lines (i can
> mark it first if needed) each to a orgmode header anyone has such a
> way?
>

Maybe I'm missing something, but can't you just add asterisks in front
of each line? Maybe with a keyboard macro? Or even a sed script?

There's a reason that org files are plain text.

Nick




[O] convert a simple list of lines each to a orgmode header

2015-09-28 Thread Xebar Saram
Hi all

im looking for a simple way to convert a simple list of lines (i can mark
it first if needed) each to a orgmode header
anyone has such a way?

best

Z