all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: text to plain list
  2012-06-22 21:02 ` Nick Dokos
@ 2012-06-22 16:06   ` Eric Schulte
  2012-06-22 21:39     ` Nick Dokos
  2012-06-22 22:23     ` Marvin Doyley
  2012-06-22 21:14   ` Marvin Doyley
  1 sibling, 2 replies; 7+ messages in thread
From: Eric Schulte @ 2012-06-22 16:06 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Marvin Doyley, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Marvin Doyley <marvinpas@gmail.com> wrote:
>
>> Hi there,
>> 
>> Is there quick method for converting a bunch of text to plain list ? 
>> 
>
> Something like
>
> sed 's/^/- /' in.txt > out.txt
>
> perhaps? If that's not what you mean, what do you mean?
>

I find Emacs Macros work very well for this.

1) position the cursor at the front of the first line
2) C-x (       to start recording a macro
3) manually turn this item into a list
4) position the cursor at the front of the next line
5) C-x )       to finish recording a macro
6) X-e         to run the macro on the second item

after that you may continue pressing "e" to re-run the macro, or run the
macro any number of times with a numeric prefix argument.  This does
however require some regularity in your list items.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* text to plain list
@ 2012-06-22 20:42 Marvin Doyley
  2012-06-22 20:59 ` William LÉCHELLE
  2012-06-22 21:02 ` Nick Dokos
  0 siblings, 2 replies; 7+ messages in thread
From: Marvin Doyley @ 2012-06-22 20:42 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi there,

Is there quick method for converting a bunch of text to plain list ?

Thanks
M

[-- Attachment #2: Type: text/html, Size: 150 bytes --]

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

* Re: text to plain list
  2012-06-22 20:42 text to plain list Marvin Doyley
@ 2012-06-22 20:59 ` William LÉCHELLE
  2012-06-22 21:02 ` Nick Dokos
  1 sibling, 0 replies; 7+ messages in thread
From: William LÉCHELLE @ 2012-06-22 20:59 UTC (permalink / raw)
  To: emacs-orgmode

Hi Marvin,

> Is there quick method for converting a bunch of text to plain list ?

C-u C-c - makes every line of the active region a list item

(C-c - makes the region one item, the bullet on the first line)

If you want each word to become an item, what I usually do is replace
(optionnaly by regexp if you master that) spaces by a newline (C-q C-j) and a
dash, and then, org-moving-around the list nicens it up, typically.

> (C-M-% SPC * C-q C-j * [A-z] … … …)

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

* Re: text to plain list
  2012-06-22 20:42 text to plain list Marvin Doyley
  2012-06-22 20:59 ` William LÉCHELLE
@ 2012-06-22 21:02 ` Nick Dokos
  2012-06-22 16:06   ` Eric Schulte
  2012-06-22 21:14   ` Marvin Doyley
  1 sibling, 2 replies; 7+ messages in thread
From: Nick Dokos @ 2012-06-22 21:02 UTC (permalink / raw)
  To: Marvin Doyley; +Cc: emacs-orgmode

Marvin Doyley <marvinpas@gmail.com> wrote:

> Hi there,
> 
> Is there quick method for converting a bunch of text to plain list ? 
> 

Something like

sed 's/^/- /' in.txt > out.txt

perhaps? If that's not what you mean, what do you mean?

Nick

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

* Re: text to plain list
  2012-06-22 21:02 ` Nick Dokos
  2012-06-22 16:06   ` Eric Schulte
@ 2012-06-22 21:14   ` Marvin Doyley
  1 sibling, 0 replies; 7+ messages in thread
From: Marvin Doyley @ 2012-06-22 21:14 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

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

C-u C-c - did the trick

thanks
M

On Fri, Jun 22, 2012 at 5:02 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Marvin Doyley <marvinpas@gmail.com> wrote:
>
> > Hi there,
> >
> > Is there quick method for converting a bunch of text to plain list ?
> >
>
> Something like
>
> sed 's/^/- /' in.txt > out.txt
>
> perhaps? If that's not what you mean, what do you mean?
>
> Nick
>

[-- Attachment #2: Type: text/html, Size: 861 bytes --]

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

* Re: text to plain list
  2012-06-22 16:06   ` Eric Schulte
@ 2012-06-22 21:39     ` Nick Dokos
  2012-06-22 22:23     ` Marvin Doyley
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2012-06-22 21:39 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Marvin Doyley, emacs-orgmode

Eric Schulte <eric.schulte@gmx.com> wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
> > Marvin Doyley <marvinpas@gmail.com> wrote:
> >
> >> Hi there,
> >>=20
> >> Is there quick method for converting a bunch of text to plain list ?=C2=
> =A0
> >>=20
> >
> > Something like
> >
> > sed 's/^/- /' in.txt > out.txt
> >
> > perhaps? If that's not what you mean, what do you mean?
> >
> 
> I find Emacs Macros work very well for this.
> 
> 1) position the cursor at the front of the first line
> 2) C-x (       to start recording a macro
> 3) manually turn this item into a list
> 4) position the cursor at the front of the next line
> 5) C-x )       to finish recording a macro
> 6) X-e         to run the macro on the second item
> 
> after that you may continue pressing "e" to re-run the macro, or run the
> macro any number of times with a numeric prefix argument.  This does
> however require some regularity in your list items.
> 

Yes, there are many methods (both emacs and otherwise; and in the event,
William Léchelle's suggestion of C-u C-c - was what Marvin was looking
for): my question was more to try to elicit what the problem was
exactly, rather than as a solution. [fn:1]

Nick

Footnotes:

[fn:1] ... although it is good to remind oneself once in a while that
       org files are just text, so one is not limited to emacs in order
       to manipulate them.

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

* Re: text to plain list
  2012-06-22 16:06   ` Eric Schulte
  2012-06-22 21:39     ` Nick Dokos
@ 2012-06-22 22:23     ` Marvin Doyley
  1 sibling, 0 replies; 7+ messages in thread
From: Marvin Doyley @ 2012-06-22 22:23 UTC (permalink / raw)
  To: Eric Schulte; +Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org

Thanks Erick for introducing me to emacs macros
Cheers
M

Sent from my iPhone

On Jun 22, 2012, at 5:23 PM, Eric Schulte <eric.schulte@gmx.com> wrote:

> Nick Dokos <nicholas.dokos@hp.com> writes:
>
>> Marvin Doyley <marvinpas@gmail.com> wrote:
>>
>>> Hi there,
>>>
>>> Is there quick method for converting a bunch of text to plain list ?
>>>
>>
>> Something like
>>
>> sed 's/^/- /' in.txt > out.txt
>>
>> perhaps? If that's not what you mean, what do you mean?
>>
>
> I find Emacs Macros work very well for this.
>
> 1) position the cursor at the front of the first line
> 2) C-x (       to start recording a macro
> 3) manually turn this item into a list
> 4) position the cursor at the front of the next line
> 5) C-x )       to finish recording a macro
> 6) X-e         to run the macro on the second item
>
> after that you may continue pressing "e" to re-run the macro, or run the
> macro any number of times with a numeric prefix argument.  This does
> however require some regularity in your list items.
>
> Best,
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte

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

end of thread, other threads:[~2012-06-22 22:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22 20:42 text to plain list Marvin Doyley
2012-06-22 20:59 ` William LÉCHELLE
2012-06-22 21:02 ` Nick Dokos
2012-06-22 16:06   ` Eric Schulte
2012-06-22 21:39     ` Nick Dokos
2012-06-22 22:23     ` Marvin Doyley
2012-06-22 21:14   ` Marvin Doyley

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.