From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17334 Path: news.gmane.org!not-for-mail From: Hugh Lawson Newsgroups: gmane.emacs.gnus.user Subject: need help on hobby project Date: Fri, 16 Jan 2015 14:29:13 -0500 Message-ID: <87h9vq34om.fsf@hobbit.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1421447224 17915 80.91.229.3 (16 Jan 2015 22:27:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 22:27:04 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Fri Jan 16 23:27:02 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YCFM5-000583-Sh for gegu-info-gnus-english@m.gmane.org; Fri, 16 Jan 2015 23:27:02 +0100 Original-Received: from localhost ([::1]:57686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCFM5-0002hk-Ao for gegu-info-gnus-english@m.gmane.org; Fri, 16 Jan 2015 17:27:01 -0500 Original-Path: usenet.stanford.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!ottix-news.ottix.net!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 16 Jan 2015 13:29:23 -0600 Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:menzoHs57zki/IBfRGESyMchR+4= Original-Lines: 44 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-yFa0CWBVUbPP5CpuuO5Osn+0HbcXHlE2yKcXoAGmnVStfMq92/NSIvEZwxfyw3TWP0bIJ8ftXHMeG6O!fp1N5FyxkIj/wUpDDce6zukzpyHYkxo4maeOLgaZavS0nlckXK6zr2PIkQw/AGwc7WyGyiYSkHjf!2vcCa64/Pj/oIufwgJbxL+m7tcmj Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2229 Original-Xref: usenet.stanford.edu gnu.emacs.gnus:88461 X-Mailman-Approved-At: Fri, 16 Jan 2015 17:27:00 -0500 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17334 Archived-At: 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 " 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.