From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Running .emacs style commands within emacs Date: Mon, 19 May 2008 23:32:20 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211258483 14618 80.91.229.12 (20 May 2008 04:41:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 May 2008 04:41:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 20 06:41:57 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JyJfg-0002PX-BW for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 06:41:56 +0200 Original-Received: from localhost ([127.0.0.1]:40007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyJew-0006Cb-9U for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 00:41:10 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 19 May 2008 23:32:05 -0500 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 19 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 65.45.140.23 Original-X-Trace: sv3-H0tntCim8iCtEYfp1/hVIDyEdmcOa8CtLdEzRlzm70Z+/SCYNpd+p1POSk/7Z6rXegFfK5feK1twenV!nF4qq7eVMTE03JfGniwm/zS/I07r2X7Ur3PSeDB0h+2c1SzSZSQbk/lfbVHkNgYu/b3hUqhbZwx+!sBbmSWXcW0RBHlnhAcFSseA71/mieA== Original-X-Complaints-To: abuse@sysmatrix.net 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.39 Original-Xref: news.stanford.edu gnu.emacs.help:158787 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54155 Archived-At: Ben Forbes 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". > This is just the expression generated when you save a macro. Try C-h f 'delete-whole-line and a *Help buffer will show this. You could shorten the macro name to 'dln and it would work the same. Try this and then invoke with M-x dln. So it's just go to beginning of line, kill line, kill newline. You can define keyboard macros and not save them if you need them for only one session. Ed