From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: etay.meiri@gmail.com Newsgroups: gmane.emacs.help Subject: Binding a key to an ibuffer filter Date: Sat, 28 Feb 2009 09:19:34 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235842898 23506 80.91.229.12 (28 Feb 2009 17:41:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2009 17:41:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 28 18:42:55 2009 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 1LdTCP-0000O0-P3 for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2009 18:42:05 +0100 Original-Received: from localhost ([127.0.0.1]:34298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdTB4-0007md-OP for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Feb 2009 12:40:42 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z9g2000yqi.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 89.138.115.216 Original-X-Trace: posting.google.com 1235841574 29788 127.0.0.1 (28 Feb 2009 17:19:34 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 28 Feb 2009 17:19:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z9g2000yqi.googlegroups.com; posting-host=89.138.115.216; posting-account=aYPwpgoAAABJuXxIZDkDtoDErg2phi4C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6) Gecko/2009020410 Fedora/3.0.6-1.fc10 Firefox/3.0.6, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167179 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:62480 Archived-At: Hi, I'm trying to bind a key to a filter in ibuffer-mode. I created a filter to display only C/C++ source files and it works ok manually (I can switch to it using ibuffer-switch-to-saved-filter). I also added the following code to .emacs: (defun ibuffer-display-source-files () (ibuffer-switch-to-saved-filter "c")) (define-key ibuffer-mode-map [f1] 'ibuffer-display-source-files) However, when I click F1 in ibuffer I get the following error: Wrong type argument: commandp, ibuffer-display-source-files Any idea? Thanks, -Etay Meiri