help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why function gives this error?.. "Wrong type argument: stringp, #<buffer


From: Chris Seberino
Subject: Why function gives this error?.. "Wrong type argument: stringp, #<buffer *Messages*>"
Date: Wed, 15 Oct 2014 09:00:07 -0700 (PDT)
User-agent: G2/1.0

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]