Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Hugh Lawson <hlawson@gmail.com>
To: info-gnus-english@gnu.org
Subject: need help on hobby project
Date: Fri, 16 Jan 2015 14:29:13 -0500	[thread overview]
Message-ID: <87h9vq34om.fsf@hobbit.i-did-not-set--mail-host-address--so-tickle-me> (raw)


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.

             reply	other threads:[~2015-01-16 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 19:29 Hugh Lawson [this message]
2015-01-16 21:01 ` Hugh Lawson
2015-01-16 21:44 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9vq34om.fsf@hobbit.i-did-not-set--mail-host-address--so-tickle-me \
    --to=hlawson@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).