emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: andrea Crotti <andrea.crotti.0@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: From formatted to table
Date: Tue, 29 Sep 2009 14:21:02 -0400	[thread overview]
Message-ID: <87ljjxeho1.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <loom.20090929T164719-606@post.gmane.org> (andrea Crotti's message of "Tue\, 29 Sep 2009 14\:48\:33 +0000 \(UTC\)")

andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I have for example a table where
>
> | one thing     | dsjfls   |
> | two things    | dslkjfls |
> | three abc dej | dsf      |
>
> And I would like to get
>
> | one   | thing   | dsjfls   |
> | two   | things  | dslkjfls |
> | three | abc dej | dsf      |
>
> I tried some simple substitutions but substituting all the spaces in
> the region selected will cause problems elsewhere.  I would need to
> substitute " " only in one column, is that possible?

Anything is possible in Emacs :) -- just look at org-mode!

This sounds like a use for a keyboard macro to me...

Position point on line 1 of the table
C-x (
C-s SPC C-s RET |
C-a C-n
C-x e
and repeat 'e' for every line in the table
then C-p C-c C-c to realign.

If you do this a lot you can save the macro or build a lisp function
that does it - repeating for the entire table.

HTH,
-Bernt

      parent reply	other threads:[~2009-09-29 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 14:48 From formatted to table andrea Crotti
2009-09-29 17:54 ` Jonathan Arkell
2009-09-29 19:07   ` Nick Dokos
2009-09-29 18:21 ` Bernt Hansen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljjxeho1.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=andrea.crotti.0@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).