emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tip: How to copy&paste a table from Firefox to Org
@ 2010-08-10 18:33 Jan Böcker
  2010-08-11  1:42 ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Böcker @ 2010-08-10 18:33 UTC (permalink / raw)
  To: Org Mode

Hi all,

posting in case this is useful to someone else:

I just figured out how to copy & paste tabular data from Firefox to an
Org buffer (in my case: a train schedule from www.bahn.de).

- Select data in Firefox
- Paste into Org, select it as the region
- M-x replace-regexp <RET> C-i \ | ^ <RET> | <RET>
	
  C-i inserts a tab character (you can also use C-q <TAB> instead).
  We replace each beginning of a line and each tab character with "|".

- Place the cursor on the table and press C-c C-c to align it

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

* Re: Tip: How to copy&paste a table from Firefox to Org
  2010-08-10 18:33 Tip: How to copy&paste a table from Firefox to Org Jan Böcker
@ 2010-08-11  1:42 ` Bernt Hansen
  2010-08-11  5:28   ` Jan Böcker
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2010-08-11  1:42 UTC (permalink / raw)
  To: Jan Böcker; +Cc: Org Mode

Jan Böcker <jan.boecker@jboecker.de> writes:

> Hi all,
>
> posting in case this is useful to someone else:
>
> I just figured out how to copy & paste tabular data from Firefox to an
> Org buffer (in my case: a train schedule from www.bahn.de).
>
> - Select data in Firefox
> - Paste into Org, select it as the region
> - M-x replace-regexp <RET> C-i \ | ^ <RET> | <RET>
> 	
>   C-i inserts a tab character (you can also use C-q <TAB> instead).
>   We replace each beginning of a line and each tab character with "|".
>
> - Place the cursor on the table and press C-c C-c to align it

Isn't this the same as

  - Select data in Firefox
  - Paste into Org. 
  - C-x C-x (select it as the region)
  - M-x org-table-convert-region

?

-Bernt

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

* Re: Tip: How to copy&paste a table from Firefox to Org
  2010-08-11  1:42 ` Bernt Hansen
@ 2010-08-11  5:28   ` Jan Böcker
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Böcker @ 2010-08-11  5:28 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Org Mode

On 08/11/2010 03:42 AM, Bernt Hansen wrote:
> Jan Böcker <jan.boecker@jboecker.de> writes:
> 
>> Hi all,
>>
>> posting in case this is useful to someone else:
>>
>> I just figured out how to copy & paste tabular data from Firefox to an
>> Org buffer (in my case: a train schedule from www.bahn.de).
>>
>> - Select data in Firefox
>> - Paste into Org, select it as the region
>> - M-x replace-regexp <RET> C-i \ | ^ <RET> | <RET>
>> 	
>>   C-i inserts a tab character (you can also use C-q <TAB> instead).
>>   We replace each beginning of a line and each tab character with "|".
>>
>> - Place the cursor on the table and press C-c C-c to align it
> 
> Isn't this the same as
> 
>   - Select data in Firefox
>   - Paste into Org. 
>   - C-x C-x (select it as the region)
>   - M-x org-table-convert-region
> 
> ?
> 
> -Bernt

Yes, it is.
I should read the manual more often to discover cool features like that!

Btw, org-table-convert-region is also bound to C-c |, which would make
the steps:

- select data in firefox
- C-y  C-x C-x  C-c |

Thanks a lot, Bernt! You see, that's the other reason I posted: I knew
if I had overlooked a much faster way, someone would point it out to me :)

- Jan

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

end of thread, other threads:[~2010-08-11  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 18:33 Tip: How to copy&paste a table from Firefox to Org Jan Böcker
2010-08-11  1:42 ` Bernt Hansen
2010-08-11  5:28   ` Jan Böcker

Code repositories for project(s) associated with this 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).