From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jefferson Carpenter Newsgroups: gmane.emacs.bugs Subject: bug#37514: PATCH: Add setting to allow switching to an already-visible buffer by default Date: Thu, 26 Sep 2019 19:14:14 +0000 Message-ID: <16d6efec8a2.e8eeab0199294.6266252545110362237@aoeu2code.com> References: <16d6a4fecc8.102faf4a4441777.3062189885757431562@aoeu2code.com> <83d0fnmsyw.fsf@gnu.org> <16d6efdc8de.c1802a0599163.8459852292203240965@aoeu2code.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="142689"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Zoho Mail Cc: 37514 <37514@debbugs.gnu.org> To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 21:32:47 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDZVN-000axM-HL for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2019 21:32:45 +0200 Original-Received: from localhost ([::1]:43651 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDZVM-0004rQ-8B for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2019 15:32:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50406) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDZEF-0001s4-Ut for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 15:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDZEE-0004qA-K0 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 15:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36400) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDZEE-0004op-Fe for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDZED-0001um-Sk for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2019 15:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jefferson Carpenter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Sep 2019 19:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37514 X-GNU-PR-Package: emacs Original-Received: via spool by 37514-submit@debbugs.gnu.org id=B37514.15695252617298 (code B ref 37514); Thu, 26 Sep 2019 19:15:01 +0000 Original-Received: (at 37514) by debbugs.gnu.org; 26 Sep 2019 19:14:21 +0000 Original-Received: from localhost ([127.0.0.1]:45221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZDZ-0001te-0Z for submit@debbugs.gnu.org; Thu, 26 Sep 2019 15:14:21 -0400 Original-Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDZDX-0001tS-EQ for 37514@debbugs.gnu.org; Thu, 26 Sep 2019 15:14:19 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1569525254; cv=none; d=zoho.com; s=zohoarc; b=ijOUce+EuGWTRam1D4IofSJ5due4eeAGTrC4cHG7X3G6VRIFbfFXoqQ1+O9Umr4F+6iE93zC6XdMHJsHBWJ3QpqNUODOu10i7gu1DvuRtJiYptx9ddXQwhYwNOTPn5eS2ICbotKEJsCd2ohmRv6+bnCzZEGwz2gh28ueWE2/uAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569525254; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=O2T4JnZEzCUO7gjiGk0MHCBy4HsibMFmDi910VRJ9FQ=; b=hGirBt4cia9tHRoNwXnNCxSTqd4Hh+jxUKa98qwoAjtpt+ZWcuPn1bQSJg1EMZ5FOlQ+AsDzTDRyuFxXRzOJO0OF2Ms2Yls8o05kFiXxzAmTOxULhLtqUZXz+G+k1aNICl2T+9VqjCwVJo2/z+vT0oBQX/3DN9zBSn9iFsKO29w= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=aoeu2code.com; spf=pass smtp.mailfrom=jefferson@aoeu2code.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1569525254; s=zoho; d=aoeu2code.com; i=jefferson@aoeu2code.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=2000; bh=O2T4JnZEzCUO7gjiGk0MHCBy4HsibMFmDi910VRJ9FQ=; b=nAnaQIvLfEzm6IGKewSPa32T76yRiyMMXK5+gZlDR3V5FkoBexofwzD2Bpkd2vqg Ni6y1QpHHqhzz08bh83+nS2lQD7prPr0rP0vhWzUTiNPygWVqdUduDrnJoQUNpQVc20 8TRyyI3baM1x87aRHlll+dj6EaGh61/N16/N32wg= Original-Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1569525254308787.9329163832814; Thu, 26 Sep 2019 12:14:14 -0700 (PDT) In-Reply-To: <16d6efdc8de.c1802a0599163.8459852292203240965@aoeu2code.com> X-Priority: Medium X-Mailer: Zoho Mail 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: 209.51.188.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:167325 Archived-At: +bug-gnu-emacs ---- On Thu, 26 Sep 2019 19:13:08 +0000 Jefferson Carpenter wrote ---- > ---- On Thu, 26 Sep 2019 07:12:23 +0000 Eli Zaretskii wrote ---- > > > > > Why is it important what "C-x b" offers as the default? You can still > > type the name of the buffer you want and switch to it. > > Because it requires fewer key strokes. > > > > > FWIW, I use the workflow you mention from time to time, and I never > > felt the need for such an option, because its effect will be global on > > the entire session, and I don't want it everywhere. I'd need to reset > > such an option when I go back to the other workflows, which would be a > > nuisance. > > > > > And if the above is somehow still not satisfactory, you can always > > write a trivial wrapper around switch-to-buffer, which behaves the way > > you like. Why do we need to canonicalize this in Emacs? > > Because IMHO, emacs (and any software) should do as little as possible by default, or at least easily allow itself to be configured to do as little as possible. I think it makes the most sense that switch-to-buffer takes you back to the last buffer you were visiting by default, without doing the extra work of preferring buffers that are not currently visible. > > > ---- On Thu, 26 Sep 2019 07:20:53 +0000 martin rudalics wrote ---- > > > > > Wouldn't 'quit-window' accomplish that without any prompting? Or > > 'switch-to-prev-buffer'? > > > > Thanks, martin > > > > No, quit-window buries the buffer that you leave, even though it switches directly to the previous buffer on the top of the buffer list, and so it cannot be used to alternate back and fourth. Switch-to-prev-buffer seems to do the same thing - executing it twice does not return you to the buffer you started at. Besides, using these functions would require adding an extra key in addition to 'C-x b', and keys are at a premium. >