[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A valid example of kbd macros - take that, Emanuel! ;-)
From: |
Marcin Borkowski |
Subject: |
Re: A valid example of kbd macros - take that, Emanuel! ;-) |
Date: |
Wed, 29 Jul 2015 09:12:07 +0200 |
On 2015-07-29, at 04:04, Emanuel Berg <embe8573@student.uu.se> wrote:
> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> The last exchange ... reminded me that you wanted an
>> example of valid kbd macro usage, not easily
>> accomplished by writing Elisp. ... Some time ago
>> I had to send 15 emails to 15 different people. (You
>> can imagine 150 instead of 15.) ... You could find
>> the Elisp functions related to ... Gnus
>
> You better believe it.
>
> (require 'cl-macs)
> (require 'gnus-msg)
> (require 'message)
>
> (cl-dolist (to '("Emanuel Berg <embe8573@student.uu.se>"
> "Manny <embe8573@student.uu.se>") )
> (gnus-post-news 'post "")
> (message-goto-to) (insert to)
> (message-goto-subject) (insert "Get ready for a surprise")
> (message-goto-body) (insert "You are not you. You are me!")
> (message-send-and-exit) )
>
> So better luck next time. However, the master is
> pleased that you take this so seriously.
>
> :)
:-) :-) :-)
Well, I /know/ it can be done, obviously. The question is: how much
time does it take to find all these Elisp functions? (Unless you /know/
them already. (And you cheated a bit: I didn't have my data in a Lisp
list, but in an Org table. Next level of function-searching.) And more
importantly: /why/ do it if you don't have to? ("Fun", "learning" and
"this I may need in the future" are legitimiate responses, of course,
but "No need to" is, too.)
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University