help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automate Emacs beautifyer ?


From: Miguel Frasson
Subject: Re: automate Emacs beautifyer ?
Date: 24 Aug 2004 12:15:16 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Bert Cuzeau <_no_spa_m_info_no_underscore_@alse-fr___.com> writes:

> Hello,
> 
> Under Windows (or Unix), is there a way to automate Emacs doing
> only :
> - open file
> - VHDL - beautify - Buffer (C-c C-b)
> - save file
> - exit
> 
> We have hundreds of files to "beautify" with VHDL-mode and it is
> a chore doing this by hand.
> Ideally, emacs with command line parameters would suit me great...
> (I would add a Tcl script for getting the files names and running
> emacs).
> 
> Thanks in advance for any suggestions,

I often make keyboard macros for thiese situations.

* make a file, say "foofiles" with one filename (full path is more
general) per line and open it in emacs.

* put the point in the first file name at the beginning of line

* start a keyborad macro with C-x (

* set mark with C-space

* goto EOL with C-e

* kill region with C-w

* press right to move the point to the next begin of line

* open file with C-x C-f

(if you are usin full path, we have to delete suggestion on finding file)

* mark with C-space

* begin of line C-a

* delete (not kill) region with M-x delete-region RET

* yank filename with C-y

* RET to open file

* C-c C-b to beutify

* Save with C-x C-s

(you returned to the initial situation)

* close keyboard macro with C-x )

Now repeat the keyboard macro one to see it it works and if it is OK, then

C-u 2 0 0 C-x e to repeat the keyboard macro 200 times.

Adapt the keybard macro for your needs.

Miguel.

-- 
Miguel Vinicius Santini Frasson
http://www.math.leidenuniv.nl/~frasson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]