all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: james <james.kingston@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Running .emacs style commands within emacs
Date: Tue, 20 May 2008 11:05:54 -0700 (PDT)	[thread overview]
Message-ID: <d486646c-c7a0-4ef6-b3e5-ae073d0d1115@25g2000hsx.googlegroups.com> (raw)
In-Reply-To: mailman.11862.1211250760.18990.help-gnu-emacs@gnu.org

On May 19, 6:51 pm, "Ben Forbes" <bdfor...@gmail.com> wrote:
> In my .emacs init file I have commands like
>
> (fset 'delete-whole-line "\C-a\C-k\C-k")
>
> How can I run a command like this from within emacs? It doesn't seem to be
> recognized when I try "M-x fset".

M-x only allows you to run interactive commands, which fset is not.

If you want to run an arbitrary lisp expression (very useful for
giving variables buffer-local values), you can use M-x eval-expression
(bound to M-: on my emacs), then you can type in your s-expression in
the minibuffer:
   (setq c-basic-offset 3)

(or you could just type it in the buffer and C-x-e, as others have
mentioned)


  parent reply	other threads:[~2008-05-20 18:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.11862.1211250760.18990.help-gnu-emacs@gnu.org>
2008-05-20  4:32 ` Running .emacs style commands within emacs B. T. Raven
2008-05-20  7:19   ` Ben Forbes
2008-05-20 13:41     ` Drew Adams
2008-05-20 22:55       ` Ben Forbes
     [not found]   ` <mailman.11880.1211284612.18990.help-gnu-emacs@gnu.org>
2008-05-20 12:26     ` B. T. Raven
2008-05-21  8:58     ` Tim X
2008-05-21 13:28       ` Joel J. Adamson
2008-05-20 18:05 ` james [this message]
2008-05-19 23:51 Ben Forbes

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=d486646c-c7a0-4ef6-b3e5-ae073d0d1115@25g2000hsx.googlegroups.com \
    --to=james.kingston@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.