From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Dired subdirectories & the ls option time-style with the %R sequence Date: Thu, 25 May 2023 08:45:24 +0200 Message-ID: <878rdcoqnv.fsf@gmail.com> References: <87fs7mugwv.fsf@gautierponsinet.xyz> <87cz2qneqn.fsf@gmail.com> 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="37179"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: gautier@gautierponsinet.xyz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 25 08:46:56 2023 Return-path: Envelope-to: ged-emacs-devel@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 1q24kP-0009SU-Sn for ged-emacs-devel@m.gmane-mx.org; Thu, 25 May 2023 08:46:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q24jI-0003JG-28; Thu, 25 May 2023 02:45:44 -0400 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 1q24jB-0003IM-J6 for emacs-devel@gnu.org; Thu, 25 May 2023 02:45:41 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q24j4-000094-Gb for emacs-devel@gnu.org; Thu, 25 May 2023 02:45:35 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f6d3f83d0cso2000735e9.2 for ; Wed, 24 May 2023 23:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684997127; x=1687589127; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=rLLDT7YnRajk5KWVbvL83DpfDGWiZ+MjPSsPc16qDwc=; b=ibT9BGJbI89QIVopQ6x8o4JgCNlAPLyyHSHN4CgwXpT3WYrltM2IE5g8Osk67SC6Bg eb4ABiBwRTsVvERqkNHohE8slg6II/7q/ex9Vd6+Ii/zwGJMdpDzaxMuNclXsG/SYGdw KxhHllQJ+5ca673d6IHO53oD5QP5pmrv0DQAk9Cu642lpCHyh4hiyT53Sp2yQECQbDwp phJql99mYbCfdxeK4imbFRm4kC8frwUFOyUX8JCXCknA5PP5RXXn8qSvwx4osDVzq+Di 6+MFn1oWfl3K6Cq1k8jCvIEyy7+rWX7B0HvYtck12XAMp2cmhyhqq+0PJttrkJRKzioJ GMaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684997127; x=1687589127; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rLLDT7YnRajk5KWVbvL83DpfDGWiZ+MjPSsPc16qDwc=; b=NsPUmOPKTT3J3dp5R4TxNdEsbrEtA+yfaJ38hGCQEcY60/J4gXNKC8PUPkxmLdXDAx /8c9guWAJLGo4FarTH8xt1mckX+a4UF6SbsIRqjHfBmrSfYI6TNH6cc8Bb31jJxK3noX a4rnjN6heCrLJYIClk8fwn512IQWxyli8pLRgOModw88r5p9NQZsNzi25ZyP004PTLil HlFzyGx2h4N+Vc2i6kHzCxouPjAvjMK03AORTRusqZY6pY2+9zUtdxvRtKt0GDpboxWP edj+Q6yV9CD9lg2CxH86Fb+nrcndgeLboTmwQwHTinscDq8C11jJBXwKqsOk4exdlaKv xFRw== X-Gm-Message-State: AC+VfDzm4NMjn40xLMb1FvxqOqE4uYzfd+bw/wHvee8YFS9fo6t4fEf+ UBaYWrtDZ0Pot80b4/vTRIh7lkHNeJY= X-Google-Smtp-Source: ACHHUZ7sbc1bG6qwiajBEyh4ofVMMfcXc0fvlKFpwRWmgrDWyeHk3pxLacluTgXRowdD4DcD2HCn6Q== X-Received: by 2002:a7b:ce12:0:b0:3f4:2174:b29d with SMTP id m18-20020a7bce12000000b003f42174b29dmr1579623wmc.1.1684997125725; Wed, 24 May 2023 23:45:25 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id y8-20020a7bcd88000000b003f6038faa19sm4490158wmj.19.2023.05.24.23.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 23:45:24 -0700 (PDT) In-Reply-To: (gautier@gautierponsinet.xyz's message of "Wed, 24 May 2023 17:03:49 +0200") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=rpluim@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306313 Archived-At: >>>>> On Wed, 24 May 2023 17:03:49 +0200, gautier@gautierponsinet.xyz said: Gautier> It seems that the exact same modification you did also need to= be done Gautier> in the Gautier> function: dired-insert-subdir-doinsert . Gautier> So, the following patch works for me: Gautier> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el Gautier> index a07406e4c0d..8d31efd4a1a 100644 Gautier> --- a/lisp/dired-aux.el Gautier> +++ b/lisp/dired-aux.el Gautier> @@ -3142,7 +3142,7 @@ dired-insert-subdir Gautier> (and (not switches) cons (setq switches (cdr cons))) Gautier> (dired-insert-subdir-validate dirname switches) Gautier> ;; case-fold-search is nil now, so we can test for capita= l `R': Gautier> - (if (setq switches-have-R (and switches (string-match-p "= R" Gautier> switches))) Gautier> + (if (setq switches-have-R (and switches (string-match-p "= [^%]R" Gautier> switches))) Gautier> ;; avoid duplicated subdirs Gautier> (setq mark-alist (dired-kill-tree dirname t))) Gautier> (if elt Gautier> @@ -3258,7 +3258,7 @@ dired-insert-subdir-doinsert Gautier> (let ((dired-actual-switches Gautier> (or switches Gautier> dired-subdir-switches Gautier> - (string-replace "R" "" dired-actual-switches)))) Gautier> + (string-replace "[^%]R" "" dired-actual-switches)))) Gautier> (if (equal dirname (car (car (last dired-subdir-alist)))) Gautier> ;; If doing the top level directory of the buffer, Gautier> ;; redo it as specified in dired-directory. That doesn=CA=BCt seem right. If you have "-lR", that would result in "-" Robert --=20