From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Trevor Murphy Newsgroups: gmane.emacs.devel Subject: Re: Why should it be so hard to tell find-dired to use a different window? Date: Sat, 22 Sep 2018 17:20:58 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1537663557 21088 195.159.176.226 (23 Sep 2018 00:45:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2018 00:45:57 +0000 (UTC) User-Agent: mu4e 1.0; emacs 26.1 Cc: "emacs-devel@gnu.org" To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 23 02:45:53 2018 Return-path: Envelope-to: ged-emacs-devel@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 1g3sX3-0005OT-2k for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2018 02:45:53 +0200 Original-Received: from localhost ([::1]:36730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3sZ9-0001JB-Nf for ged-emacs-devel@m.gmane.org; Sat, 22 Sep 2018 20:48:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3sWr-0001Dq-W1 for emacs-devel@gnu.org; Sat, 22 Sep 2018 20:45:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3s9B-00031d-2J for emacs-devel@gnu.org; Sat, 22 Sep 2018 20:21:17 -0400 Original-Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:35670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g3s97-0002zZ-JY for emacs-devel@gnu.org; Sat, 22 Sep 2018 20:21:10 -0400 Original-Received: by mail-pg1-x52f.google.com with SMTP id v133-v6so99904pgb.2 for ; Sat, 22 Sep 2018 17:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=r+i4iwgbl6mgsriKPTAZiKS6WWipBCbnd7XI7PA/eqQ=; b=aiZxJXwMd16Fzk/bFNkLOvMZukccZen4g8MANLA6/N76wEyELfg+od4lnzaDGrYirG m4TW0VQ29QPX6kAXNaBo/qDkcV0ohOA9PIDFo4G+jW4U9HVXu6wiCMI/Lc/iJMiVcI1s DG418arCuSkrLsW1cxP6LQ8mNEMhwOlnEncxBpE+n6ZIVjLEe+EOfAl8ddQZzuTGFLug yV9rBUkCoCdn10rRC0DWAsIZwLYRTECwXEeGiwgD09+WF7qvGj7fQcH4XFQgviVPcy6B IY61cYQ8r1obPF9kg7GsMRycEYSU/X2EaVIPteNvWo9uXKZtuba032JajqhBiCx3tN2y SVfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=r+i4iwgbl6mgsriKPTAZiKS6WWipBCbnd7XI7PA/eqQ=; b=EL+CJwHgpAAQijPEh00BPNXQJ5pEpJ5QRFb4I7rXBz6xJclQiJEbqBkXzglGnjAuQS 5qmTV9weVx0R0EWErUah6ue5kDXrYDY95fkHQSCsajfyVMw8UwC2ZVWctgttIdE+vNwd k6TXpR+vUinY9YP5QHjRn87NwuhDs3xRKzpkXGx0/+9X5uBcWYlucW9sugfOaB0N+0I2 NKvPAjbecTbtDIuQ1+aPIyqLGEa+KKewPv0nTBOl3v8LE8eGKq+NDUIatO4hzKpQqZvv XZtTzsvn0TNxPYieSS9gTDhGCEvRllqe5p/4qMjm//Gy/FLWI0WAm5z+1K0Hr0s2+QyQ Kz+A== X-Gm-Message-State: APzg51BlegZ7/l4Hb2tA7xzBlz+TS70f+OGe8IAUqJS8ASEUyLQ1nsh4 i9IiTEyHOjhiV+iAxH8NZya/cGZG X-Google-Smtp-Source: ANB0VdZMmd8PlQo1RsPjjnRwuoqx+E8JYNvrRiZnjTeORznhcZbjZtnV4VGOAF+Ep1yT6xLmslwLRA== X-Received: by 2002:a62:3241:: with SMTP id y62-v6mr4212819pfy.4.1537662065553; Sat, 22 Sep 2018 17:21:05 -0700 (PDT) Original-Received: from bucephalus (157-131-196-141.fiber.dynamic.sonic.net. [157.131.196.141]) by smtp.gmail.com with ESMTPSA id m21-v6sm53295577pgd.6.2018.09.22.17.21.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Sep 2018 17:21:03 -0700 (PDT) In-Reply-To: jwvva6yzyyw.fsf-monnier gmane.emacs.devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229995 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable > There's pop-to-buffer-same-window. > >> Is there any particular reason to keep using switch-to-buffer=20 >> here? > > AFAIK the only reason is history Alright, well, I mean I=E2=80=99ve already signed over my copyright to FSF= =20 and this is a super small change. Here=E2=80=99s the obvious patch, I=20 hope it gets applied. I don=E2=80=99t think it can negatively affect anybody=E2=80=99s quality of= life.=20 I don=E2=80=99t see any calls to find-dired and friends in the stock Emacs= =20 codebase, I don=E2=80=99t see any calls in major packages I might expect=20 to use dired under the hood (e.g. neotree), and so I=E2=80=99d only worry=20 about interactive use of the command. But then without additional=20 customization p-t-b-s-w should behave the same as s-t-b. Then on the positive side this would allow customization if folks=20 (like me) use find-dired and friends on a regular basis. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-user-customization-to-affect-display-of-Find-b.patch >From 51ce5d68a2a6e870dfbb7b8839d0d45489effc85 Mon Sep 17 00:00:00 2001 From: Trevor Murphy Date: Sat, 22 Sep 2018 16:42:20 -0700 Subject: [PATCH] Allow user customization to affect display of *Find* buffer. * lisp/find-dired.el (find-dired): Change buffer display function. --- lisp/find-dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index ebd14b0757..9a798b0e39 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -144,7 +144,7 @@ find-dired ;; Check that it's really a directory. (or (file-directory-p dir) (error "find-dired needs a directory: %s" dir)) - (switch-to-buffer (get-buffer-create "*Find*")) + (pop-to-buffer-same-window (get-buffer-create "*Find*")) ;; See if there's still a `find' running, and offer to kill ;; it first, if it is. -- 2.19.0 --=-=-=--