reddit / emacs

proper way to set register values during init?

jsled · 2022-11-01 19:52
(set-register "z" "[complex html I want to be able to insert into org-mime-htmlize'd emails]") does seems to fail in a couple of ways. I've seen `registerv-make` too, and that doesn't seem to do the trick. Can anyone give me a simple template to have registers set to single- or multi-line-strings during init? (for bonus points, how about a kmacro? I have a certain sequence for interacting with gnus to process hundreds of emails a day that I'd love to not have to redefine every session)
yes_I_still_use_helm · 2022-11-01 20:00
(set-register ?z "[complex html I want to be able to insert into org-mime-htmlize'd emails]")
jsled · 2022-11-01 21:30
Thanks!
7890yuiop · 2022-11-02 00:39
I.e. interactive registers are identified by *characters* rather than strings. See also `C-h i g (elisp)Basic Char Syntax`
ZebraHedgehog · 2022-11-03 00:04
> how about a kmacro First name the last macro defined with `M-x kmacro-name-last-macro` then go to your config file and run `M-x insert-kbd-maco <ret> name <ret>`. Now you should be able to invoke the macro with `M-x` and whatever you named it.
jsled · 2022-11-03 00:34
thanks!