Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* need help on hobby project
@ 2015-01-16 19:29 Hugh Lawson
  2015-01-16 21:01 ` Hugh Lawson
  2015-01-16 21:44 ` Emanuel Berg
  0 siblings, 2 replies; 3+ messages in thread
From: Hugh Lawson @ 2015-01-16 19:29 UTC (permalink / raw)
  To: info-gnus-english


To improve my scanty knowledge of elisp, I want to rewrite a macro as a
function. I can't get to first base on this.  I think I can do this if
given links or keywords for the self-instruction of a noob.

For example I can't make out this:  

(shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)

I can't find a reference on how to read this line.

The function  should do this:

I put point  on a word in text buffer.  Then I hit a command
key, say C-l.

2.command key calls function that does this:

          reads word into an accessible place as a string

          shell-command "whitaker <put word string here>"

          latin calls my latin-english dictionary

          the output appears in the shell command buffer

3.  I accomplised this with this  keyboard macro:

 

;;look up latin words
(fset 'whitaker
   [?\M-x ?c ?o ?p ?y ?- ?w ?o tab return ?\M-x ?s ?h ?e ?l tab ?- ?c ?o ?m ?m tab return ?l ?a ?t ?i ?n ?  ?\C-y return])


(global-set-key (kbd "C-l") 'whitaker)
          

The macro uses the function copy-word, borrowed from here:


http://www.emacswiki.org/emacs/CopyWithoutSelection

Thanks.

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

end of thread, other threads:[~2015-01-16 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-16 19:29 need help on hobby project Hugh Lawson
2015-01-16 21:01 ` Hugh Lawson
2015-01-16 21:44 ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).