From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp
Newsgroups: gmane.emacs.bugs
Subject: bug#48471: 28.0.50;
Incorrect handling of `project-ignores' on macOS (BSD find?) if
project root is a directory name
Date: Sun, 16 May 2021 22:05:21 +0200
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="3619"; mail-complaints-to="usenet@ciao.gmane.io"
To: 48471@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 16 22:11:10 2021
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 1liN6T-0000pf-T9
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 May 2021 22:11:10 +0200
Original-Received: from localhost ([::1]:41276 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1liN6S-0007Ah-Tl
for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 May 2021 16:11:08 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46276)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1liN1W-0001sV-O2
for bug-gnu-emacs@gnu.org; Sun, 16 May 2021 16:06:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:39997)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1liN1W-0004aV-DZ
for bug-gnu-emacs@gnu.org; Sun, 16 May 2021 16:06:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1liN1W-0007VA-4T
for bug-gnu-emacs@gnu.org; Sun, 16 May 2021 16:06:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 16 May 2021 20:06:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 48471
X-GNU-PR-Package: emacs
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org
Original-Received: via spool by submit@debbugs.gnu.org id=B.162119553028776
(code B ref -1); Sun, 16 May 2021 20:06:01 +0000
Original-Received: (at submit) by debbugs.gnu.org; 16 May 2021 20:05:30 +0000
Original-Received: from localhost ([127.0.0.1]:51542 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1liN0z-0007U2-S2
for submit@debbugs.gnu.org; Sun, 16 May 2021 16:05:30 -0400
Original-Received: from lists.gnu.org ([209.51.188.17]:47866)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1liN0y-0007Tv-3z
for submit@debbugs.gnu.org; Sun, 16 May 2021 16:05:28 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46128)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1liN0x-00082d-UJ
for bug-gnu-emacs@gnu.org; Sun, 16 May 2021 16:05:27 -0400
Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:40764)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1liN0v-00048N-TZ
for bug-gnu-emacs@gnu.org; Sun, 16 May 2021 16:05:27 -0400
Original-Received: by mail-ej1-x62e.google.com with SMTP id n2so6084304ejy.7
for ; Sun, 16 May 2021 13:05:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:subject:date:message-id:mime-version;
bh=EHlCxTsziUlBXTm0iyRlp9gfcRez98FyJcrh+C+Mok0=;
b=hzJGFl2V/i/pOP/0OWhPGB7vNQk2UlJT4Ib0kn8SguFOhUkQlTxeCMMmPIPwBj3WBl
OXUUk44RzXoTX26PpBg79Sp4EH+eMxFOjtgMqXRxFUAuGNYg7OPJnSastACXCFHSBKLx
W1JEJ7wOpjmYG21yvEY7Xa5/k1pzTWAaErP9cdblU9or+Jz1FIpP9yDc82hJTSNSEnh1
6gVwS9RkcIvpkCBpMS6KLmxA8Kqw7GTvpUufwHHfMNoGr0UXCafM73/lQDQuRbHtrmyI
Nl1sdfA5CGI5zcr5/I3SP7iWL8xnbznhLEOV7V3xRZwHY2Dlar9MrzZd1qitCxQt1gKK
pK0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
bh=EHlCxTsziUlBXTm0iyRlp9gfcRez98FyJcrh+C+Mok0=;
b=tKrqSxOzoBZLfNDCfWj6auUwVj1/ebSl/nWcP0A+ukA6ni0WmV3t/tOoni+Mtpkrjf
o5AfIDg/1ETAQ9DRPePFcVBzy3qRy+KYR8GJfvPHIJ5IJ3Rn3hea4iApJise9ugtUwlA
MGfMzZ+g2qePc2c8CzuJ+j8C98nzv/ybw9zVxOSQ9NMP2eRhooyb6FtyzAP/v2bCFr0T
Fza6ntz/h3HUu05pSLA1Q2EAxW3x6u9v6DMiGd+ic34ZrkrVDfUZVmu5yC4D1tA2/aQb
fd5JHaEKCuykPauJGJ+BwDbgQGrcsyT4vNfXLmWQa97Jt7zlygMtalGP/h0bo8vf2Lfu
VBhQ==
X-Gm-Message-State: AOAM532kkM+or8HUaU/m6RhdRLU2qCJya6qyVUJITJte6gAWA72WPl4J
AfPtt4k6Jgn5oTEEjwX09AQSCz8VQ/NdaQ==
X-Google-Smtp-Source: ABdhPJxEbfyzr+hWmoI5PqHgfpNLceKtAY9XUpejdDkkqe1iIjONtOZlfcwjM7cYVYFvzVVLGgE/sw==
X-Received: by 2002:a17:906:538a:: with SMTP id
g10mr32803225ejo.243.1621195522887;
Sun, 16 May 2021 13:05:22 -0700 (PDT)
Original-Received: from Philipps-MBP.fritz.box ([46.128.198.100])
by smtp.gmail.com with ESMTPSA id e22sm9790748edu.35.2021.05.16.13.05.21
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 16 May 2021 13:05:22 -0700 (PDT)
Received-SPF: pass client-ip=2a00:1450:4864:20::62e;
envelope-from=p.stephani2@gmail.com; helo=mail-ej1-x62e.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
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"
Xref: news.gmane.io gmane.emacs.bugs:206684
Archived-At:
The following happens at least on macOS with its BSD find. It does
*not* happen with GNU find.
Create an empty directory /tmp/foo and files bar and baz in that
directory. Then, define a trivial project:
(cl-defmethod project-roots ((_ (eql foo))) '("/tmp/foo/"))
(cl-defmethod project-ignores ((_ (eql foo)) _) '("./bar"))
The important point here is that the project root is a directory name,
not a directory file name.
Now, with macOS find:
(project-files 'foo)
=> ("/tmp/foo//bar" "/tmp/foo//baz")
Note how the `project-ignores' result has been ignored. The problem is
that macOS find doesn't normalize the directory name in any way:
/tmp/foo$ find /tmp/foo/
/tmp/foo/
/tmp/foo//baz
/tmp/foo//bar
/tmp/foo$ find /tmp/foo/ '(' -path /tmp/foo/bar -prune ')' -o -print
/tmp/foo/
/tmp/foo//baz
/tmp/foo//bar
/tmp/foo$ find /tmp/foo/ '(' -path /tmp/foo//bar -prune ')' -o -print
/tmp/foo/
/tmp/foo//baz
XRef will generate a prune pattern like /tmp/foo/bar, and find will
ignore it because it doesn't exactly match the filenames.
To work around this, XRef should probably only pass directory file names
to find, not directory names, at least on macOS.
In GNU Emacs 28.0.50 (build 119, aarch64-apple-darwin20.4.0, NS appkit-2022.44 Version 11.3.1 (Build 20E241))
of 2021-05-16
Repository revision: 0212fb180a118795b4de383cc712e7079c998cef
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2022
System Description: macOS 11.3.1
Configured using:
'configure --with-modules --without-xml2 --without-pop --with-mailutils
--enable-gcc-warnings=warn-only --enable-checking=all
--enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''
Configured features:
ACL GNUTLS JSON LCMS2 MODULES NOTIFY KQUEUE NS PDUMPER PNG THREADS
TOOLKIT_SCROLL_BARS ZLIB
Important settings:
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822
mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils phst skeleton derived edmacro kmacro pcase ffap thingatpt url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json map url-vars mailcap rx
gnutls puny dbus xml subr-x seq byte-opt gv bytecomp byte-compile cconv
compile text-property-search comint ansi-color ring cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process emacs)
Memory information:
((conses 16 70856 6582)
(symbols 48 8362 1)
(strings 32 24246 2104)
(string-bytes 1 792999)
(vectors 16 16049)
(vector-slots 8 212521 6692)
(floats 8 26 28)
(intervals 56 220 0)
(buffers 992 10))