axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Developers and Axiom


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Developers and Axiom
Date: Sun, 09 Apr 2006 11:12:59 +0200
User-agent: Thunderbird 1.5 (X11/20051201)

Hi Jay,

What I like in this mail is that people come forward with things that work well for them and try to advertise. We can all learn from that. Not every emacs user knows about all the many ways that emacs can help to make work more productive.

What about a wiki "EmacsAxiomBestPractice" where something like that here would be written?

Ralf

On 04/09/2006 04:17 AM, Jay Belanger wrote:
root <address@hidden> writes:
...
     3) now the real magic happens with emacs....

        in emacs it is possible to set the "compile" command or
        you can use a "command line macro". i use the macro approach.

        in emacs you can record a whole set of keystrokes and make
        them into a command line macro that you can execute with "C-x e"

        after i've changed the source file i want to
          a) save the changes (C-x C-s)
          b) switch to the shell buffer (C-x o)
          c) make -f Makefile.foo to run the makefile
          d) switch back to my program to continue editing.

        using the command line macro i can have this all happen in 1 keystroke

        to create a command line macro you type "C-x (" to start recording
        and "C-x )" to stop recording.

        so, with a split screen and the cursor in your code buffer and
        the shell in the other buffer do:

        C-x (                 <== start recording
        C-x C-s               <== save the changes
        C-o                   <== switch to the shell
        M-x >                 <== go to the end of the shell buffer
        make -f Makefile.foo  <== run make
        C-x o                 <== switch back to the code buffer
        C-x )                 <== stop recording

and now you have all the magic because "C-x e" does it all.

 do forever
   type your changes to your literate program,
   type "C-x e" to noweave, latex, notangle, compile, test, and update xdvi
   click on xdvi to see the changes

i find it extremely productive. i run "C-x e" every 10 lines of changes
(about once every minute or two) so i know that the latest change will
compile, latex, and run the test cases properly.

But you need half the screen devoted to a shell, which really
shouldn't be necessary.  Why not simply have a command which runs the
makefile with `shell-command' or something similar?
(local-set-key "\C-ce" (lambda () (interactive)
                  (shell-command "make -f Makefile.foo &")))
Or something could be arranged so any output goes to a (normally
non-showing) buffer, which could be displayed in case of an error.

Jay





reply via email to

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