all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Heinrich Dietrich <paul.heinrich.dietrich@gmail.com>
To: Help-gnu-emacs@gnu.org
Subject: Newby trying to do a macro key binding, I think
Date: Tue, 17 Nov 2009 17:41:52 -0800 (PST)	[thread overview]
Message-ID: <26401079.post@talk.nabble.com> (raw)


How do you write the code for a macro and key binding (I think that's how to
do it) in your .emacs file so that you can hit a key, say f5, and the
following command is automatically entered:

C-x d /me@servername#99:/home/directory/path/

I've tried a billion variations on a theme, but can't get it to work.  For
example, I tried

C-x (C-x d /me@servername#99:/home/directory/path/C-x)

and I forget the routine now, but did something with kbd and names and
managed to get the code into my .emacs file.  The first problem is that the
main part of it (/me@servername#99:/home/directory/path/) wouldn't appear
because as I created the macro, Emacs tried to suggest a path that was
wildly different, so I had to backspace about 15 times and then type it, but
when I get the macro code into the .emacs file, all I see are a lot of
backspace backspace backspace...and no path.

No biggee, so I tried putting quotes around it, ?\ in front of it, etc.

What did I do wrong?  Go easy, I'm in the earliest learning stages of Emacs.

Next, I'm guessing I want to use a key binding.  Let's say I called the
macro pathfinder.  I think I would establish the key binding like this:

(global-set-key "\C-c a") 'pathfinder)

or

;(global-set-key [f5] 'pathfinder)

depending on whether I want to call it with f5 or C-c a.  Any help is
appreciated.  Thanks.
-- 
View this message in context: http://old.nabble.com/Newby-trying-to-do-a-macro-key-binding%2C-I-think-tp26401079p26401079.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





             reply	other threads:[~2009-11-18  1:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18  1:41 Paul Heinrich Dietrich [this message]
2009-11-18  6:38 ` Newby trying to do a macro key binding, I think Dirk-Jan C. Binnema
2009-11-18 18:14 ` Paul Heinrich Dietrich
     [not found] ` <mailman.10977.1258568059.2239.help-gnu-emacs@gnu.org>
2009-11-18 18:21   ` David Kastrup
2009-11-18 23:01     ` Paul Heinrich Dietrich
2009-11-18 19:23 ` Thien-Thi Nguyen
     [not found] <mailman.10952.1258524409.2239.help-gnu-emacs@gnu.org>
2009-11-18  9:11 ` harven

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=26401079.post@talk.nabble.com \
    --to=paul.heinrich.dietrich@gmail.com \
    --cc=Help-gnu-emacs@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.