all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miguel Frasson <frasson@mira.math.leidenuniv.nl>
Subject: Re: automate Emacs beautifyer ?
Date: 24 Aug 2004 12:15:16 +0200	[thread overview]
Message-ID: <gyr7pwu9jf.fsf@mira.math.leidenuniv.nl> (raw)
In-Reply-To: cges4r$ln5$1@news-reader5.wanadoo.fr

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

  parent reply	other threads:[~2004-08-24 10:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24  7:53 automate Emacs beautifyer ? Bert Cuzeau
2004-08-24  8:22 ` Joost Kremers
2004-08-24 10:15 ` Miguel Frasson [this message]
2004-08-25  8:31   ` Oliver Scholz
2004-08-25  8:48     ` Miguel Frasson
2004-08-25 15:58       ` Kevin Rodgers
2004-08-29  9:48         ` Oliver Scholz
2004-09-02  2:10           ` date discrepancies Sebastian Luque
     [not found]           ` <mailman.1182.1094095164.1998.help-gnu-emacs@gnu.org>
2004-09-02  7:04             ` Pascal Bourguignon
2004-09-02 14:42               ` Sebastian Luque
2004-09-02 16:17                 ` Sebastian Luque
2004-09-02 19:29             ` Stefan Monnier
2014-08-13 14:26               ` thymythos
2004-08-25 16:03       ` automate Emacs beautifyer ? David Kastrup
2004-08-25 20:30       ` LEE Sau Dan
2004-08-24 15:52 ` Kevin Rodgers
2004-08-24 19:13   ` Michael Slass
2004-08-24 23:27     ` Kevin Rodgers
2004-08-25  0:15       ` Michael Slass
2004-08-25 16:12         ` Kevin Rodgers
2004-08-26 15:26     ` Kevin Rodgers
2004-08-28 10:58 ` Kai Grossjohann

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

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

  git send-email \
    --in-reply-to=gyr7pwu9jf.fsf@mira.math.leidenuniv.nl \
    --to=frasson@mira.math.leidenuniv.nl \
    /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 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.