all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergei Organov <osv@javad.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Elusive buffer(s).
Date: Thu, 29 Dec 2011 20:28:54 +0400	[thread overview]
Message-ID: <jdi4g6$v50$1@dough.gmane.org> (raw)
In-Reply-To: 4EFC8469.2090509@gmx.at

martin rudalics <rudalics@gmx.at> writes:

[...]

> If you want to look at the C code of Emacs, you will find out that the
> function responsible for managing this behavior is record_buffer (in
> buffer.c) and you will find out that this function is called once only -
> in select_window (in window.c).  So unless you select a buffer's window,
> that buffer is not recorded.

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?

[...]

>> File: elisp,  Node: The Buffer List:
>>
>>    In addition to the fundamental buffer list just described, Emacs
>> maintains a local buffer list for each frame, in which the buffers that
>> have been displayed (or had their windows selected) in that frame come
>> first.
>>
>> Seems to suggest that displayed buffers should also be there in the
>> frame-local buffer list?
>
> Yes.  This text is misleading. You should file a bug report.

Thanks a lot for clarification.

>> BTW, the question relates to the issue I've reported 2 years ago here:
>>
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5185
>>
>> but in that case *cvs* buffer was also current buffer in the original
>> frame, so that report is definitely a bug that I'm still able to
>> reproduce.

> Emacs 24 has two functions `switch-to-prev-buffer' and
> `switch-to-next-buffer' which respectively switch to the buffer
> previously shown in a window and undo that.  You should try them because
> they do not depend on whether a buffer's window was previously selected
> or not.

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.

-- 
Sergei.




  reply	other threads:[~2011-12-29 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 15:16 Elusive buffer(s) martin rudalics
2011-12-29 16:28 ` Sergei Organov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-29 12:31 Sergei Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jdi4g6$v50$1@dough.gmane.org' \
    --to=osv@javad.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.