From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74700: [PATCH] Revert Dired buffer when clicking on last segment of directory name Date: Thu, 05 Dec 2024 11:42:50 +0100 Message-ID: <87a5dammvp.fsf@gmx.net> References: <874j3iodzb.fsf@gmail.com> <86ttbiy5na.fsf@gnu.org> <87zflamt6j.fsf@gmail.com> <86frn2y10v.fsf@gnu.org> <8734j2y02t.fsf@gmail.com> <86bjxqxz20.fsf@gnu.org> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36143"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74700@debbugs.gnu.org, Visuwesh To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 05 11:44:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tJ9LL-0009DA-QV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Dec 2024 11:44:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJ9L2-0002a5-NL; Thu, 05 Dec 2024 05:44:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJ9L0-0002Zs-Lb for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 05:44:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJ9L0-0004tE-Cd for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 05:44:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=bfRMLLqaismng5a0cwUexJweOJvxfL7zRl/StYUioTI=; b=C90JLi61Qr+FKDc/LdGgKUPGoxjBgktvmcuL9tl5Y54f1P17ozv9clEOsvkRgM6ArWH+q/FgymSWlUizbZwELgaOtTm4Wa+SgrHOMZHSNsQkIryeBrcRHEFAlL0BDeYaUPK1IH4o3b+nb+ZrjZyxxlD6Z5gGSAW6z676GENagJQhLFCAsCe527X8jsm3XGC81th21cvX3SJOGGfeTZl6TebFoJfXNlmKxjgEbfhusoavzXvl/3kmWQSv1Ev+cpAF1tG4iE+07aUwFAWkrlAQrcZBdsiQf+VuYQPWvmnIjjQ9OxY+ol2c4QX3JgCMjGp/lXVPV1a7OwPOl8uoiQrwTA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJ9Kz-0005bL-UL for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2024 05:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2024 10:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74700-submit@debbugs.gnu.org id=B74700.173339539021460 (code B ref 74700); Thu, 05 Dec 2024 10:44:01 +0000 Original-Received: (at 74700) by debbugs.gnu.org; 5 Dec 2024 10:43:10 +0000 Original-Received: from localhost ([127.0.0.1]:38425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ9K9-0005a3-HL for submit@debbugs.gnu.org; Thu, 05 Dec 2024 05:43:09 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:53035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJ9K7-0005Zl-KL for 74700@debbugs.gnu.org; Thu, 05 Dec 2024 05:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1733395371; x=1734000171; i=stephen.berman@gmx.net; bh=bfRMLLqaismng5a0cwUexJweOJvxfL7zRl/StYUioTI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=muJtWvhukzDSr+l3Jccj+MI8R2gzKYzglIDWnClZi7yN9QQ0WR9JewaGACf9MODp IyjDodzo+RIUiVFzyAZxRVGw5GEXQ5DY+2995A5E0ZgvTmuoLos18J194x2f8B6Ml IsdX3BAL4Hwm/6wzfW21sLUcO2wf1czX8MKHeD8KrShvfV3nV1LnREXwMpiBEQRoY ANmSMgWPYAh+Bo9KuZaJAg2ZGfJUAE2S0h32577d5ZHMDTugBtDBFk2m7+BDT+Gbi cG3CsNAAiSWZXB3X6XoIaJdNl0eH2//fMgM7PencLO9DHP1vugbZlQM44BPJw5DjE 0lSPuCTHv7eiWbMDbw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([94.134.94.128]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUrx-1tYEGQ2FB3-015hFL; Thu, 05 Dec 2024 11:42:51 +0100 In-Reply-To: <86bjxqxz20.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Dec 2024 11:24:23 +0200") X-Provags-ID: V03:K1:0tcBxNNRPJ91rZoW4Ib36OvumE7VFSaoDqCOtAPHf3Td5VKATWD zXOVD6Z2TTjrSJ9h4p5CFP+gTS+GLk9KrnJUQHeduwFYHKcFihJyxbejyrPxCw82FVffQU1 CAJMOxMwtJmkNw7dbmT6mck6SDn7W84ONoHsWr/BEvMJtFfBYvOpOC/orr+kpdYFts+ASUZ j/p/IabhZSVU123kdT+IQ== UI-OutboundReport: notjunk:1;M01:P0:ahUi8II23eE=;rOBOeDJPnYDSsG2qgPvi3IPByW3 MZpdeq9uVwjPK6RsUnGIbbBoLoNtTpPPWnJGsAybaaWqfkaNa3A7kH0zSJdy11j5QZ495WMCB w7sOXKe33tpa5t7AxlcniqyKuj4//45CuK+o7fthXWJ//jftLNU13rslZ3sWSbfUhB5U5Fin2 iCCj2KjWaMww4khPV2bkmVcmr8UtNF1/+Gm5wazHwXu8OI1TC5IsGX665c/kk/4nbrJxeCHp2 kl9gjPbmbrX7O0g8hfZbms/+Za352tblhFiiDdRrNoQAPt/wjur8iF5OxiKvTPm0gzt4aBn9M E1M0idjT6XSR6rZAU7gK5LO8H/FgxXNpVxDbjJz4eYl3V//VJreqVFTXUqcVMOQ56C+nCfzn3 tkB5JckxnjnC63W4G71FcUo3RvlH9R+E4SFDzK1vd3CW7aCO2ZRQw0PrIhX5s91TXLCNPxBrE TkpPuNNIXa5H7SZulpvZbIlwNbD+fI6lirhMgEYjdLzU2TCD2JFEV/5RHVzG1LzHq+yHSIHJc TYU6NetMcijMLMj6u5TSxNNmhSUsVFobHsmEuAKuDCWjXVlVil31Af6oGuE+bHp1G0Fvl41J1 8io7wRBXSOB2La8fx6uiTja5lcrl7+Zmi3S1K7dYiQjERw8ZsE/bHRFoHKyVd1GAInszOoLTz dg7UPt01sHMwbY9/+z3DK1vJ0xsnnw4aVbVmC8El37JGkjRAtI+CvPWnAgLZxcFo6nNnU+3KD 64sQb8cecQW076c6EkaXlOF4sXgnZg+nBqsilFzZ3DhR7OLCGifkV47+hGA51OrTBfntSDIm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296469 Archived-At: On Thu, 05 Dec 2024 11:24:23 +0200 Eli Zaretskii wrote: >> From: Visuwesh >> Cc: 74700@debbugs.gnu.org >> Date: Thu, 05 Dec 2024 14:32:18 +0530 >>=20 >> [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE= =9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 05, 2024= ] Eli Zaretskii wrote: >>=20 >> >> I removed the whitespace. But isn't that way to make lists such as >> >>=20 >> >> ( 1 >> >> 2 >> >> 3) >> >>=20 >> >> aligned without manual intervention? >> > >> > Typing something like >> > >> > (setq foo (1 >> > 2 >> > 3) >> > >> > aligns the members for me. So I don't think I understand what you are >> > saying here. >>=20 >> Try to align >>=20 >> (setq foo '(1 2 >> 3)) >>=20 >> instead. 3 would end up aligning at 2 instead of 1. > > Yes, and why is that a problem? This is the standard Lisp indentation > in Emacs. It makes it easy to find the end of the sexps. > >> Adding a space after ( prevents this. > > I'm not sure I understand why overriding the standard indentation > would be a good idea. Sometimes the standard indentation makes the code harder to read, e.g., the sexp that the indentation in Visuwesh's patch took as an example is this (starting at column 10): (add-text-properties segment-start (1- (point)) `( mouse-face highlight help-echo "mouse-1: goto this directory" keymap ,(let* ((current-dir dir) (click (lambda () (interactive) (cond ((assoc current-dir dired-subdir-alist) (dired-goto-subdir current-dir)) ;; If there is a wildcard chars ;; in the directory name, don't ;; use the alternate file machinery ;; which tries to keep only one ;; dired buffer open at once. ;; ;; FIXME: Is this code path reachable? ((insert-directory-wildcard-in-dir-p current-dir) (dired current-dir)) (t (dired--find-possibly-alternative-file current-dir)))))) (define-keymap "" click "" 'mouse-face "RET" click)))) Here is the indentation without the space (in dired.el several lines of this code extend well beyond column 80): (add-text-properties segment-start (1- (point)) `(mouse-face highlight help-echo "mouse-1: goto this directory" keymap ,(let* ((current-dir dir) (click (lambda () (interactive) (cond ((assoc current-dir dired-subdir-ali= st) (dired-goto-subdir current-dir)) ;; If there is a wildcard chars ;; in the directory name, don't ;; use the alternate file machinery ;; which tries to keep only one ;; dired buffer open at once. ;; ;; FIXME: Is this code path reachabl= e? ((insert-directory-wildcard-in-dir-p current-dir) (dired current-dir)) (t (dired--find-possibly-alternative-f= ile current-dir)))))) (define-keymap "" click "" 'mouse-face "RET" click)))) Steve Berman