all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.