From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27997: pick a better buffer to fill the gap, not one I already see Date: Mon, 07 Aug 2017 12:49:59 +0900 Message-ID: <87tw1knijc.fsf@calancha-pc> References: <87y3qwkybj.fsf@jidanni.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502077873 11862 195.159.176.226 (7 Aug 2017 03:51:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Aug 2017 03:51:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27997@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 07 05:51:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deZ4L-0002g1-NW for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Aug 2017 05:51:05 +0200 Original-Received: from localhost ([::1]:35237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deZ4R-0004Ce-TZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Aug 2017 23:51:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deZ4M-0004CC-CK for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 23:51:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deZ4J-00063V-Ac for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 23:51:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deZ4J-00062W-6M for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 23:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1deZ4I-0005DF-IN for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 23:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Aug 2017 03:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27997 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27997-submit@debbugs.gnu.org id=B27997.150207781519973 (code B ref 27997); Mon, 07 Aug 2017 03:51:02 +0000 Original-Received: (at 27997) by debbugs.gnu.org; 7 Aug 2017 03:50:15 +0000 Original-Received: from localhost ([127.0.0.1]:45156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deZ3W-0005C4-Lm for submit@debbugs.gnu.org; Sun, 06 Aug 2017 23:50:14 -0400 Original-Received: from mail-pf0-f194.google.com ([209.85.192.194]:38507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deZ3T-0005Bf-Sp for 27997@debbugs.gnu.org; Sun, 06 Aug 2017 23:50:12 -0400 Original-Received: by mail-pf0-f194.google.com with SMTP id h75so7829901pfh.5 for <27997@debbugs.gnu.org>; Sun, 06 Aug 2017 20:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=S2JpD/c6ISLdfUWYlcnGYIuEQ0n8UJGowgyeu8T0DC4=; b=aXlN4fuSZbOQEz7RFX1ZLlU9fDmyHRvAqanNRFAXE0fHxiz7fsGy2WElnTYcZYGwLw lHiA1byGJI4dsVPVk1Tzq1wgNaEu6BJ/gQGhDVUhkBaYhs3jLPk8Y8IZCsMr+uePFUUT nTkVG5pW1zoXjD0zRRtfHbMZuU1bOUwuvH4iPAcXzU3orR9TaERJoEg94KACCVXvDWXX ODskpWznIir2tPZdZXxTQXD3Xndc3IzVQaiy1S9Og+Kmti+pDsvzwROhMx6zchNOvrsu rBmUxINof4QlBeW9spXD4aKvaiYAcCssHm/sGzxyYP8NxikachKmVWMRpVwQx8DIK+a/ KXvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=S2JpD/c6ISLdfUWYlcnGYIuEQ0n8UJGowgyeu8T0DC4=; b=j3rUVBAMkktL//9yYcXa4D8cyBJHZdVxGFWN8HvBhO+0q44dZqu4bFgqZ/MknLCxB2 iMjViKsJvRHXEH8inSKiI+TP8Vh/WMjvf1DFC6HJVHd2V+ZFkCKsXWEwUJ+XkZkmNEkv tGxGCYQS/d1yjbanDjwjrJ2JJuF+7IGX0sBUt/+wfSI5yT6dJaoUlHjJcPOLx12KM+nq SZjSC2iRzaTQcbFSvHUCd5PEoGGlLehUvv3AqOs+0BT8sD04B6Kh250vnq0PTdaJmq+W sgEV3hm//eX9m+BgETXFcIrMCL/LS+aQkoXXCZ9G7OE65arPh0ePOgSLAJpPA0yKW1rk 2kZg== X-Gm-Message-State: AIVw111X3iWLEbQ+/E7vbs7BG6BLichVp1ITPwFKGOkiI3VHi08Qegn2 LhjIS3ghFrHJDw== X-Received: by 10.101.86.74 with SMTP id m10mr10147567pgs.79.1502077805707; Sun, 06 Aug 2017 20:50:05 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id 204sm11719628pga.85.2017.08.06.20.50.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 Aug 2017 20:50:04 -0700 (PDT) In-Reply-To: <87y3qwkybj.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Mon, 07 Aug 2017 08:37:20 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135527 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > OK I killed a buffer, so a new one pops in to replace it. > > Except sometimes the choice of the new one is quite embarrassing: it > picks a buffer I'm already looking at while at the same time ignoring a > better candidate. > > $ emacs -Q /tmp/a /tmp/b /tmp/c > C-x 1 [delete-other-windows] > C-x 4 b [switch-to-buffer-other-window] # Smart enough not to prompt wit= h the name of a buffer I already see. Good. > [minibuffer-complete-and-exit] # was prompted with "b", OK > C-x k [kill-buffer] # was prompted with "b", OK > [minibuffer-complete-and-exit] # killed "b", OK, but... > > Now I'm staring at two "c" buffers! > I would be better served by staring at "a" and "c" buffers. > > So please when selecting a buffer to fill the gap, > again be smart enough not to show a buffer I already see. The original code pick up the previous buffer shown in that same window. That's a feature; sometimes might be desirable. For instance, ;; Imagine we want to split the window to show two ;; differents parts of a large buffer. emacs -Q src/data.c C-x 3 ; split-window-right M-> ; end-of-buffer M-v ; scroll-down-command ;; Wanna see who commited the line at point. C-x v g ; I see, Daniel was. ;; Some people don't use `quit-window', just `C-x b' and `C-x k' C-x k RET ; This return me where i was ;; Still have src/data.c split in the upper/lower parts. ;; With your suggestion we will have src/data.c in one ;; window and a diferent buffer (*scratch*) in another. IMO, if we follow your suggestion it must be configurable with an option (nil by default).