unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Why function gives this error?.. "Wrong type argument: stringp, #<buffer *Messages*>"
@ 2014-10-15 16:00 Chris Seberino
  2014-10-15 16:55 ` Matthias Pfeifer
  2014-10-15 17:47 ` Barry Margolin
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Seberino @ 2014-10-15 16:00 UTC (permalink / raw)
  To: help-gnu-emacs


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-15 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-15 16:00 Why function gives this error?.. "Wrong type argument: stringp, #<buffer *Messages*>" Chris Seberino
2014-10-15 16:55 ` Matthias Pfeifer
2014-10-15 17:47 ` Barry Margolin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).