Thursday, April 19, 2007

Setting new keyboard macro in emacs

The process is described here

Here is the final entry in your init.el file.


(fset 'newslide
[?\C-7 ?\C-7 ?% return ?% ?% ?% ?% ?% ?% ?% ? ? ?N ?E ?W ?\S- ?S ?L ?I ?D ?E return ?\C-7 ?\C-7 ?% return return ?\\ ?b ?e ?s ?{ ? ? ?} return return ?\\ ?e ?s return return])
(global-set-key [f8] 'newslide)



Now just press F8 and you will get an entry like

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% NEW SLIDE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\bes{ }

\es



which I used as demarcation while preparing latex slides

WOW you can type so much using just one key stroke :)

No comments: