all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to edit already defined macros
@ 2012-08-01 22:45 Ferdinand
  2012-08-02  3:42 ` John Wiegley
  0 siblings, 1 reply; 4+ messages in thread
From: Ferdinand @ 2012-08-01 22:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I made a macro, gave it a name and inserted it as lisp-code (M-x insert-kbd-macro) in the .emacs file (so that it gets loaded on startup).

But now, what do I do if I made a slight mistake and want to change something in the macro?

I can see the macro in macro buffer (edit-kbd-macro), which is nice.
But I can't change something there.

And I don't even get the lisp-code for the defined macro
(M-x insert-kbd-macro and putting in the defined name for the macro gives me a "no match" error).

So how do you change/edit already into lisp converted and saved macros?


thanks!





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

* Re: how to edit already defined macros
  2012-08-01 22:45 how to edit already defined macros Ferdinand
@ 2012-08-02  3:42 ` John Wiegley
  2012-08-02 11:22   ` Ferdinand
  0 siblings, 1 reply; 4+ messages in thread
From: John Wiegley @ 2012-08-02  3:42 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Ferdinand  <Ferdinand.Gruebler@gmx.de> writes:

> I made a macro, gave it a name and inserted it as lisp-code (M-x
> insert-kbd-macro) in the .emacs file (so that it gets loaded on startup).

> But now, what do I do if I made a slight mistake and want to change
> something in the macro?

C-x C-k RET.  And be amazed.

John



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

* Re: how to edit already defined macros
  2012-08-02  3:42 ` John Wiegley
@ 2012-08-02 11:22   ` Ferdinand
  2012-08-02 12:40     ` Doug Lewan
  0 siblings, 1 reply; 4+ messages in thread
From: Ferdinand @ 2012-08-02 11:22 UTC (permalink / raw)
  To: John Wiegley; +Cc: help-gnu-emacs


On Aug 2, 2012, at 5:42 AM, "John Wiegley" <johnw@newartisans.com> wrote:

>>>>>> Ferdinand  <Ferdinand.Gruebler@gmx.de> writes:
> 
>> I made a macro, gave it a name and inserted it as lisp-code (M-x
>> insert-kbd-macro) in the .emacs file (so that it gets loaded on startup).
> 
>> But now, what do I do if I made a slight mistake and want to change
>> something in the macro?
> 
> C-x C-k RET.  And be amazed.
> 
> John
> 

Hi John,

ok, that brings me to the edit macro-buffer. And of course I can change things there.

But these changes only persist for one session (as far as I know). 
In my .emacs file is still the old lisp-code that is not affected by changes in the macro-buffer and that will get loaded again the next time I open emacs.

So, how can I for instance transform the (changed) macro-buffer into lisp code, so that I can replace my original lisp code?


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

* RE: how to edit already defined macros
  2012-08-02 11:22   ` Ferdinand
@ 2012-08-02 12:40     ` Doug Lewan
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Lewan @ 2012-08-02 12:40 UTC (permalink / raw)
  To: Ferdinand, John Wiegley; +Cc: help-gnu-emacs@gnu.org

In the edit-macro-buffer there is a line near the top with the keyword "Command:". You can give the macro a name there.

To save it in a file, find that file and type
    M-x insert-kbd-macro

That should give you LISP that you can use next time. (Don't forget where you put it!)

If you want to load it every time, then do the above in your .emacs file.

I hope this helps.

,Doug


> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Ferdinand
> Sent: Thursday, 2012 August 02 07:22
> To: John Wiegley
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: how to edit already defined macros
> 
> 
> On Aug 2, 2012, at 5:42 AM, "John Wiegley" <johnw@newartisans.com>
> wrote:
> 
> >>>>>> Ferdinand  <Ferdinand.Gruebler@gmx.de> writes:
> >
> >> I made a macro, gave it a name and inserted it as lisp-code (M-x
> >> insert-kbd-macro) in the .emacs file (so that it gets loaded on
> startup).
> >
> >> But now, what do I do if I made a slight mistake and want to change
> >> something in the macro?
> >
> > C-x C-k RET.  And be amazed.
> >
> > John
> >
> 
> Hi John,
> 
> ok, that brings me to the edit macro-buffer. And of course I can change
> things there.
> 
> But these changes only persist for one session (as far as I know).
> In my .emacs file is still the old lisp-code that is not affected by
> changes in the macro-buffer and that will get loaded again the next
> time I open emacs.
> 
> So, how can I for instance transform the (changed) macro-buffer into
> lisp code, so that I can replace my original lisp code?



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

end of thread, other threads:[~2012-08-02 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 22:45 how to edit already defined macros Ferdinand
2012-08-02  3:42 ` John Wiegley
2012-08-02 11:22   ` Ferdinand
2012-08-02 12:40     ` Doug Lewan

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.