From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27435: patch for dired-mouse-find-file-other-window Date: Sat, 02 Sep 2017 13:20:06 +0300 Message-ID: <834lsl1jxl.fsf@gnu.org> References: <83ziam698h.fsf@gnu.org> <20170826.182658.1910804375178800263.tkk@misasa.okayama-u.ac.jp> <83o9r262uc.fsf@gnu.org> <20170827.180243.351755072000785818.tkk@misasa.okayama-u.ac.jp> <83zial3wf9.fsf@gnu.org> <35B0B760-56DC-43A4-B6C9-B29A51CF4547@misasa.okayama-u.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1504347694 15720 195.159.176.226 (2 Sep 2017 10:21:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Sep 2017 10:21:34 +0000 (UTC) Cc: 27435@debbugs.gnu.org To: Tak Kunihiro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 02 12:21:18 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 1do5Y5-0002xi-7H for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 12:21:09 +0200 Original-Received: from localhost ([::1]:34740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1do5YC-0002Gq-9v for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 06:21:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1do5Y2-0002GE-Ls for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 06:21:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1do5Xx-00081M-VA for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 06:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1do5Xx-00081G-RB for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 06:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1do5Xx-0005jj-L7 for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 06:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2017 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27435-submit@debbugs.gnu.org id=B27435.150434762822005 (code B ref 27435); Sat, 02 Sep 2017 10:21:01 +0000 Original-Received: (at 27435) by debbugs.gnu.org; 2 Sep 2017 10:20:28 +0000 Original-Received: from localhost ([127.0.0.1]:41482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1do5XQ-0005ir-JO for submit@debbugs.gnu.org; Sat, 02 Sep 2017 06:20:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1do5XO-0005id-7a for 27435@debbugs.gnu.org; Sat, 02 Sep 2017 06:20:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1do5XD-0007ez-Iu for 27435@debbugs.gnu.org; Sat, 02 Sep 2017 06:20:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1do5XD-0007em-Ey; Sat, 02 Sep 2017 06:20:15 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1896 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1do5XC-0000yn-Qq; Sat, 02 Sep 2017 06:20:15 -0400 In-reply-to: <35B0B760-56DC-43A4-B6C9-B29A51CF4547@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Mon, 28 Aug 2017 09:22:35 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:136462 Archived-At: > From: Tak Kunihiro > Date: Mon, 28 Aug 2017 09:22:35 +0900 > Cc: 国広卓也 , > 27435@debbugs.gnu.org > > With the suggestions, I created two functions. > > - dired-mouse-find-file (new, this inherits common part) > - dired-mouse-find-file-other-window > - dired-mouse-find-file-other-frame (new) > > I attach the patch. This does not change the default behavior. Thanks. Some minor comments: > +(defun dired-mouse-find-file (event &optional find-file-func find-dir-func) > + "In Dired, visit the file or directory name you click on. > +FIND-FILE-FUNC and FIND-DIR-FUNC specify functions to visit the file and directory, respectively." This last line is too long, please break it into 2. Also, the doc string should say explicitly these arguments are optional, and what they default to if omitted or nil. > + (or find-file-func (setq find-file-func 'find-file)) > + (or find-dir-func (setq find-file-func 'find-alternate-file)) I'm not sure I understand why these particular defaults. Can you explain? In particular, find-alternate-file sounds strange to me. Finally, 2 nits: . please always provide a log message for the changes . your patch doesn't apply cleanly, presumably due to some difference in whitespace vs the Git repository; please make sure your diffs are always against the latest Git version Thanks.