* Re: Re: Elusive buffer(s).
@ 2011-12-29 19:55 martin rudalics
0 siblings, 0 replies; only message in thread
From: martin rudalics @ 2011-12-29 19:55 UTC (permalink / raw)
To: osv; +Cc: help-gnu-emacs
> That's clear, thanks, but then for the bug report I've mentioned below
> the question remains. How pcl-cvs managed to create and _select_ the
> *cvs* buffer without it appearing in the frame-local buffer list? Is it
> still a bug? Emacs or pcl-cvs one?
If you told me which function call is responsible for displaying that
buffer, I could try to look what happens. Probably only very few people
nowadays use pcl-cvs and that's why no one so far responded to your bug
report.
> I don't have Emacs 24 yet, but even if I had I can't see right now how I
> can use those functions to make a function that switches between two
> recent buffers. As I wrote in those bug-report, the function that I use
> (and bind to a key) looks like:
>
> (defun switch-to-previous-buffer ()
> "Switch to the previous buffer."
> (interactive)
> (switch-to-buffer (other-buffer (current-buffer))))
>
> I also noticed that I never able to select *Info* buffer with this
> function. Why?
>
> BTW, an extended function that cycles between recent N buffers
> would be even more cool.
>
> FYI, it all started when I switched from XEmacs to Emacs. XEmacs has
> this function built-in and it's very convenient once one gets used to
> it. It's not a very big deal, but my attempt to emulate it in Emacs is
> still only semi-successful.
`other-buffer' isn't very useful for that. I'd use the first N elements
of a list I would construct as in the completely untested snippet below.
martin
(let (list)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when buffer-display-time
(setq list (cons (cons (float-time buffer-display-time) buffer) list)))))
(sort list (function (lambda (a b) (> (car a) (car b))))))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-12-29 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 19:55 Re: Elusive buffer(s) martin rudalics
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.