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: Why function gives this error?.. "Wrong type argument: stringp, #" Date: Wed, 15 Oct 2014 09:00:07 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1413388857 30228 80.91.229.3 (15 Oct 2014 16:00:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2014 16:00:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 18:00:50 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XeR0M-0004XZ-I1 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2014 18:00:50 +0200 Original-Received: from localhost ([::1]:45443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeR0L-0001EM-H4 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2014 12:00:49 -0400 X-Received: by 10.68.132.200 with SMTP id ow8mr2644657pbb.8.1413388807848; Wed, 15 Oct 2014 09:00:07 -0700 (PDT) X-Received: by 10.182.58.102 with SMTP id p6mr10902obq.32.1413388807637; Wed, 15 Oct 2014 09:00:07 -0700 (PDT) Original-Path: usenet.stanford.edu!uq10no11256450igb.0!news-out.google.com!rp1ni29760igb.0!nntp.google.com!h18no6178779igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.193.13.167; posting-account=VkuUtQkAAADKqMjRUmZTNs7a8uCSNNy2 Original-NNTP-Posting-Host: 74.193.13.167 User-Agent: G2/1.0 Injection-Date: Wed, 15 Oct 2014 16:00:07 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:208185 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100461 Archived-At: I tried to write a function that goes to next buffer **in alphabetical order**. (I set f8 to call it.) It makes a sorted version of buffer list and goes to next buffer in the list... (global-set-key [f8] (lambda () (interactive) (let ((sorted-list (sort (buffer-list) 'string<))) (switch-to-buffer (nth 2 (member (current-buffer) sorted-list)))))) Any help greatly appreciated. cs