From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Seberino Newsgroups: gmane.emacs.help Subject: This code won't match buffer names. Why not? Date: Fri, 21 Aug 2009 17:31:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: <30670a65-7226-4950-b43a-adb2890eec1c@i18g2000pro.googlegroups.com> 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 1250901650 17281 80.91.229.12 (22 Aug 2009 00:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2009 00:40:50 +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 Aug 22 02:40:43 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 1Meeeu-0004Eg-V2 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Aug 2009 02:40:41 +0200 Original-Received: from localhost ([127.0.0.1]:38148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Meeeu-0006w3-Ae for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 20:40:40 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!postnews.google.com!i18g2000pro.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: 199.106.103.250 Original-X-Trace: posting.google.com 1250901117 19159 127.0.0.1 (22 Aug 2009 00:31:57 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 22 Aug 2009 00:31:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i18g2000pro.googlegroups.com; posting-host=199.106.103.250; posting-account=VkuUtQkAAADKqMjRUmZTNs7a8uCSNNy2 User-Agent: G2/1.0 X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.4.4798) X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:172215 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:67369 Archived-At: When I cycle through buffers, I'd like to skip *scratch*, *Messages* and *Whitespace Errors* buffers. I wrote following code to skip one more buffer if I'm sitting in either of those 3. However, it never matches those buffers. Why not? (BTW, the (end-kbd-macro) is just a dummy function since "if" needs an "else" command. Is there a better dummy command I can add there?) ; Sets F10 to execute a function that moves to another buffer. (global-set-key [f10] (lambda () (interactive) (next-buffer) (if (equal (current-buffer) "*scratch*") (next-buffer) (end-kbd-macro)) (if (equal (current-buffer) "*Messages*") (next-buffer) (end-kbd-macro)) (if (equal (current-buffer) "*Whitespace Errors*") (next-buffer) (end-kbd-macro))))