unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jürgen Hartmann" <juergen_hartmann_@hotmail.com>
To: martin rudalics <rudalics@gmx.at>,
	"20861@debbugs.gnu.org" <20861@debbugs.gnu.org>
Subject: bug#20861: 24.4/5; [PATCH] Consistency of switch-to-visible-buffer
Date: Mon, 22 Jun 2015 12:01:06 +0200	[thread overview]
Message-ID: <DUB124-W2164CB723973051BF62D5AA8A10@phx.gbl> (raw)
In-Reply-To: <5587CC2A.9050305@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Martin Rudalics wrote:

> Thanks Jürgen
>
> Unfortunately your patch does not apply to current master/trunk here
> (even with a large fuzz factor).  Can you try to make a patch against
> the current version of window.el?  You should be able to retrieve it
> from
>
> http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/window.el
>
> You don't have to compile it, I'll check that here.  Also please post
> the patch as attachment and in unified format.
>
> Thanks in advance, martin

Been there, done that.

Thank you Martin Rudalics.

Jürgen

 		 	   		  

[-- Attachment #2: buffer-cycling.patch --]
[-- Type: application/octet-stream, Size: 1880 bytes --]

diff -ruN original/window.el changed/window.el
--- original/window.el	2015-06-22 11:12:17.385663505 +0200
+++ changed/window.el	2015-06-22 11:35:00.646695905 +0200
@@ -3874,12 +3874,10 @@
 (defcustom switch-to-visible-buffer t
   "If non-nil, allow switching to an already visible buffer.
 If this variable is non-nil, `switch-to-prev-buffer' and
-`switch-to-next-buffer' may switch to an already visible buffer
-provided the buffer was shown before in the window specified as
-argument to those functions.  If this variable is nil,
-`switch-to-prev-buffer' and `switch-to-next-buffer' always try to
-avoid switching to a buffer that is already visible in another
-window on the same frame."
+`switch-to-next-buffer' may switch to an already visible buffer.
+If this variable is nil, `switch-to-prev-buffer' and
+`switch-to-next-buffer' always try to avoid switching to a buffer
+that is already visible in another window on the same frame."
   :type 'boolean
   :version "24.1"
   :group 'windows)
@@ -3950,7 +3948,8 @@
                    (or (null pred) (funcall pred buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
 		   (or bury-or-kill (not (memq buffer next-buffers))))
-	  (if (get-buffer-window buffer frame)
+	  (if (and (not switch-to-visible-buffer)
+		   (get-buffer-window buffer frame))
 	      ;; Try to avoid showing a buffer visible in some other window.
 	      (unless visible
 		(setq visible buffer))
@@ -4052,7 +4051,8 @@
                    (or (null pred) (funcall pred buffer))
 		   (not (eq (aref (buffer-name buffer) 0) ?\s))
 		   (not (assq buffer (window-prev-buffers window))))
-	  (if (get-buffer-window buffer frame)
+	  (if (and (not switch-to-visible-buffer)
+		   (get-buffer-window buffer frame))
 	      ;; Try to avoid showing a buffer visible in some other window.
 	      (setq visible buffer)
 	    (setq new-buffer buffer)

  reply	other threads:[~2015-06-22 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-20 20:34 bug#20861: 24.4/5; [PATCH] Consistency of switch-to-visible-buffer Jürgen Hartmann
2015-06-22  8:49 ` martin rudalics
2015-06-22 10:01   ` Jürgen Hartmann [this message]
2015-06-23 15:59     ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DUB124-W2164CB723973051BF62D5AA8A10@phx.gbl \
    --to=juergen_hartmann_@hotmail.com \
    --cc=20861@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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 public inbox

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

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).