From unknown Sun Jun 22 07:31:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#62735 <62735@debbugs.gnu.org> To: bug#62735 <62735@debbugs.gnu.org> Subject: Status: 30.0.50; project.el project-search errors because project-files returns directories Reply-To: bug#62735 <62735@debbugs.gnu.org> Date: Sun, 22 Jun 2025 14:31:11 +0000 retitle 62735 30.0.50; project.el project-search errors because project-fil= es returns directories reassign 62735 emacs submitter 62735 Robert Nikander severity 62735 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 00:11:36 2023 Received: (at submit) by debbugs.gnu.org; 9 Apr 2023 04:11:37 +0000 Received: from localhost ([127.0.0.1]:60005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plMOt-0004BB-6Q for submit@debbugs.gnu.org; Sun, 09 Apr 2023 00:11:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:33686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plGNb-0008Dl-5O for submit@debbugs.gnu.org; Sat, 08 Apr 2023 17:45:52 -0400 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 1plGNa-0000SC-SM for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2023 17:45:50 -0400 Received: from ms11p00im-qufo17281501.me.com ([17.58.38.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plGNW-0000Sm-Pz for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2023 17:45:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1680990343; bh=AGEQUg1lxyYf86csclztREwTaHoyzXrV8dACbetDRsI=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=UIA1Z4k/5KpkIPPOvrHvy8wjWVgrMaiOYADs3xiYGCcyTMc39DISLutXhKsmurSg3 VZS0mrYI9QMgrvFtk7LWsc2v3X8kV/qAlVcp+UrPnc5xqkHbWRcdqt9b9wa8bMSZKE dwOsSlzOxfmi9SRNW6E5hXoz1NVbzOztXDYxAY8/WVHCUOvJCKMkwxKzcU1EJItMQO a3cxuDj0J5HVkXroUbsLCsYDd5swYGTif7kz9e/aHmInEzLGSUWvWFhCMbHIgBKovs ESxx8IUeO6RPfiaI7SBZ5EqLRdOjilGrg7sIBhlaTpDmcTsTEhSnWGLXtVaO8WujIV PewuAefe3W0oQ== Received: from smtpclient.apple (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17281501.me.com (Postfix) with ESMTPSA id 5A43CB61BFA for ; Sat, 8 Apr 2023 21:45:42 +0000 (UTC) From: Robert Nikander Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: 30.0.50; project.el project-search errors because project-files returns directories Message-Id: Date: Sat, 8 Apr 2023 15:45:29 -0600 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3731.500.231) X-Proofpoint-GUID: EdEpxauXQD4V-FTHXQs3wn_AGXUlrhvU X-Proofpoint-ORIG-GUID: EdEpxauXQD4V-FTHXQs3wn_AGXUlrhvU X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1011 bulkscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2304080197 Received-SPF: pass client-ip=17.58.38.52; envelope-from=robert.nikander@icloud.com; helo=ms11p00im-qufo17281501.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 09 Apr 2023 00:11:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, I tried to run the command `project-search`, documented in "29.2.1 = Project Commands That Operate on Files=E2=80=9D. It threw an error = because it tried to process a directory. The backtrace from debugger is = below. The function defined right below `project-search` in project.el is = `project-query-replace-regexp`. It has this comment and line: ;; XXX: Filter out Git submodules, which are not regular files. ;; `project-files' can return those, which is arguably suboptimal, ;; but removing them eagerly has performance cost. (cl-delete-if-not #'file-regular-p (project-files (project-current = t))) I added the same to `project-search` and it seems to have =E2=80=9Cfixed=E2= =80=9D it. I don=E2=80=99t know how `project-files` works, but probably = it would be better to fix that. This directory =E2=80=9C=E2=80=A6/SomeDir/=E2=80=9C has a .git directory = inside it. That appears to be why project-files picked it up, because = deleting that .git subdir also avoids the error. But projects should be = able to have nested .git directories, depending on how the =E2=80=98projec= t=E2=80=99 is defined. Rob Debugger entered--Lisp error: (file-error "Read error" "Is a directory" = "/Users/rob/Workspace/MonoRepo/Foo/SomeDir/") insert-file-contents("/Users/rob/Workspace/MonoRepo/Foo/SomeDir/" nil) (condition-case nil (insert-file-contents new nil) (file-missing = (fileloop-next-file novisit))) (if (not (and new novisit)) (set-buffer (find-file-noselect next)) = (set-buffer (get-buffer-create " *next-file*")) = (kill-all-local-variables) (erase-buffer) (setq new next) = (condition-case nil (insert-file-contents new nil) (file-missing = (fileloop-next-file novisit)))) (let* ((buffer (get-file-buffer next)) (new (not buffer))) (and buffer = fileloop-revert-buffers (not (verify-visited-file-modtime buffer)) (if = (eq fileloop-revert-buffers 'silent) (and (not (buffer-modified-p = buffer)) (let ((revertible nil)) (let ((tail revert-without-query)) = (while tail (let ... ... ...))) revertible)) (y-or-n-p (format (if = (buffer-modified-p buffer) "File %s changed on disk. Discard your = edits? " "File %s changed on disk. Reread from disk? ") next))) = (save-current-buffer (set-buffer buffer) (revert-buffer t t))) (if (not = (and new novisit)) (set-buffer (find-file-noselect next)) (set-buffer = (get-buffer-create " *next-file*")) (kill-all-local-variables) = (erase-buffer) (setq new next) (condition-case nil (insert-file-contents = new nil) (file-missing (fileloop-next-file novisit)))) new) (let ((next (condition-case nil (iter-next fileloop--iterator) = (iter-end-of-sequence nil)))) (if next nil (and novisit (get-buffer " = *next-file*") (kill-buffer " *next-file*")) (user-error "All files = processed")) (let* ((buffer (get-file-buffer next)) (new (not buffer))) = (and buffer fileloop-revert-buffers (not (verify-visited-file-modtime = buffer)) (if (eq fileloop-revert-buffers 'silent) (and (not = (buffer-modified-p buffer)) (let ((revertible nil)) (let (...) (while = tail ...)) revertible)) (y-or-n-p (format (if (buffer-modified-p buffer) = "File %s changed on disk. Discard your edits? " "File %s changed on = disk. Reread from disk? ") next))) (save-current-buffer (set-buffer = buffer) (revert-buffer t t))) (if (not (and new novisit)) (set-buffer = (find-file-noselect next)) (set-buffer (get-buffer-create " = *next-file*")) (kill-all-local-variables) (erase-buffer) (setq new next) = (condition-case nil (insert-file-contents new nil) (file-missing = (fileloop-next-file novisit)))) new)) fileloop-next-file(t) fileloop-continue() project-search("simple.*State") In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2023-03-05 built on builder10-14.lan Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.3 Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules --with-x-toolkit=3Dno' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER SQLITE3 THREADS TOOLKIT_SCROLL_BARS ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t server-mode: t dap-tooltip-mode: t dap-ui-many-windows-mode: t dap-ui-controls-mode: t dap-ui-mode: t dap-auto-configure-mode: t dap-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t shell-dirtrack-mode: t ivy-mode: t org-extra-emphasis-intraword-emphasis-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /Users/rob/.emacs.d/elpa/transient-20230315.1520/transient hides = /Applications/Emacs.app/Contents/Resources/lisp/transient /Users/rob/.emacs.d/elpa/xref-1.6.0/xref hides = /Applications/Emacs.app/Contents/Resources/lisp/progmodes/xref /Users/rob/.emacs.d/elpa/org-9.6.1/ob-exp hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp /Users/rob/.emacs.d/elpa/org-9.6.1/ob-emacs-lisp hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp /Users/rob/.emacs.d/elpa/org-9.6.1/oc hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc /Users/rob/.emacs.d/elpa/org-9.6.1/ob-css hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css /Users/rob/.emacs.d/elpa/org-9.6.1/ob-lob hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob /Users/rob/.emacs.d/elpa/org-9.6.1/ol-irc hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-irc /Users/rob/.emacs.d/elpa/org-9.6.1/ob-forth hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-forth /Users/rob/.emacs.d/elpa/org-9.6.1/org-macs hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs /Users/rob/.emacs.d/elpa/org-9.6.1/ob hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob /Users/rob/.emacs.d/elpa/org-9.6.1/org-version hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-version /Users/rob/.emacs.d/elpa/org-9.6.1/ob-scheme hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme /Users/rob/.emacs.d/elpa/org-9.6.1/ox hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox /Users/rob/.emacs.d/elpa/org-9.6.1/ob-C hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C /Users/rob/.emacs.d/elpa/org-9.6.1/org-capture hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture /Users/rob/.emacs.d/elpa/org-9.6.1/ob-ref hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref /Users/rob/.emacs.d/elpa/org-9.6.1/ob-clojure hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure /Users/rob/.emacs.d/elpa/org-9.6.1/org-mouse hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse /Users/rob/.emacs.d/elpa/org-9.6.1/org-persist hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-persist /Users/rob/.emacs.d/elpa/org-9.6.1/org-ctags hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags /Users/rob/.emacs.d/elpa/org-9.6.1/org-entities hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities /Users/rob/.emacs.d/elpa/org-9.6.1/org-archive hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive /Users/rob/.emacs.d/elpa/org-9.6.1/ob-screen hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen /Users/rob/.emacs.d/elpa/org-9.6.1/ol-bibtex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bibtex /Users/rob/.emacs.d/elpa/org-9.6.1/ob-haskell hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell /Users/rob/.emacs.d/elpa/org-9.6.1/org-loaddefs hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs /Users/rob/.emacs.d/elpa/org-9.6.1/org-table hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-table /Users/rob/.emacs.d/elpa/org-9.6.1/ol-eww hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eww /Users/rob/.emacs.d/elpa/org-9.6.1/ol-man hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-man /Users/rob/.emacs.d/elpa/org-9.6.1/ox-org hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org /Users/rob/.emacs.d/elpa/org-9.6.1/org-num hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-num /Users/rob/.emacs.d/elpa/org-9.6.1/org-plot hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot /Users/rob/.emacs.d/elpa/org-9.6.1/ol-rmail hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-rmail /Users/rob/.emacs.d/elpa/org-9.6.1/ob-awk hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk /Users/rob/.emacs.d/elpa/org-9.6.1/ob-groovy hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-groovy /Users/rob/.emacs.d/elpa/org-9.6.1/ob-octave hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave /Users/rob/.emacs.d/elpa/org-9.6.1/org-faces hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces /Users/rob/.emacs.d/elpa/org-9.6.1/oc-biblatex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc-biblatex /Users/rob/.emacs.d/elpa/org-9.6.1/org-colview hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview /Users/rob/.emacs.d/elpa/org-9.6.1/ob-R hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R /Users/rob/.emacs.d/elpa/org-9.6.1/org-refile hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-refile /Users/rob/.emacs.d/elpa/org-9.6.1/org-timer hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer /Users/rob/.emacs.d/elpa/org-9.6.1/org-mobile hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile /Users/rob/.emacs.d/elpa/org-9.6.1/ob-fortran hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran /Users/rob/.emacs.d/elpa/org-9.6.1/ob-shell hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shell /Users/rob/.emacs.d/elpa/org-9.6.1/ob-perl hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl /Users/rob/.emacs.d/elpa/org-9.6.1/ob-sqlite hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite /Users/rob/.emacs.d/elpa/org-9.6.1/oc-basic hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc-basic /Users/rob/.emacs.d/elpa/org-9.6.1/ob-sed hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sed /Users/rob/.emacs.d/elpa/org-9.6.1/org-list hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-list /Users/rob/.emacs.d/elpa/org-9.6.1/ob-ruby hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby /Users/rob/.emacs.d/elpa/org-9.6.1/ob-eval hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval /Users/rob/.emacs.d/elpa/org-9.6.1/org-habit hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit /Users/rob/.emacs.d/elpa/org-9.6.1/org-clock hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock /Users/rob/.emacs.d/elpa/org-9.6.1/org-goto hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-goto /Users/rob/.emacs.d/elpa/org-9.6.1/ox-html hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html /Users/rob/.emacs.d/elpa/org-9.6.1/org-src hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-src /Users/rob/.emacs.d/elpa/org-9.6.1/ob-lisp hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp /Users/rob/.emacs.d/elpa/org-9.6.1/ol-eshell hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-eshell /Users/rob/.emacs.d/elpa/org-9.6.1/ob-ditaa hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa /Users/rob/.emacs.d/elpa/org-9.6.1/org-pcomplete hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete /Users/rob/.emacs.d/elpa/org-9.6.1/org-lint hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-lint /Users/rob/.emacs.d/elpa/org-9.6.1/ox-latex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex /Users/rob/.emacs.d/elpa/org-9.6.1/ob-sass hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass /Users/rob/.emacs.d/elpa/org-9.6.1/ob-tangle hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle /Users/rob/.emacs.d/elpa/org-9.6.1/ob-calc hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc /Users/rob/.emacs.d/elpa/org-9.6.1/ob-java hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java /Users/rob/.emacs.d/elpa/org-9.6.1/ox-icalendar hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar /Users/rob/.emacs.d/elpa/org-9.6.1/ol-mhe hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-mhe /Users/rob/.emacs.d/elpa/org-9.6.1/org-attach-git hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach-git /Users/rob/.emacs.d/elpa/org-9.6.1/ox-md hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md /Users/rob/.emacs.d/elpa/org-9.6.1/ox-beamer hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer /Users/rob/.emacs.d/elpa/org-9.6.1/org-element hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-element /Users/rob/.emacs.d/elpa/org-9.6.1/oc-natbib hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc-natbib /Users/rob/.emacs.d/elpa/org-9.6.1/org-protocol hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol /Users/rob/.emacs.d/elpa/org-9.6.1/ob-gnuplot hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot /Users/rob/.emacs.d/elpa/org-9.6.1/org-tempo hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-tempo /Users/rob/.emacs.d/elpa/org-9.6.1/ob-latex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex /Users/rob/.emacs.d/elpa/org-9.6.1/ol-w3m hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-w3m /Users/rob/.emacs.d/elpa/org-9.6.1/org-id hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-id /Users/rob/.emacs.d/elpa/org-9.6.1/ox-man hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man /Users/rob/.emacs.d/elpa/org-9.6.1/ol-doi hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-doi /Users/rob/.emacs.d/elpa/org-9.6.1/org-feed hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed /Users/rob/.emacs.d/elpa/org-9.6.1/org-fold-core hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-fold-core /Users/rob/.emacs.d/elpa/org-9.6.1/ob-julia hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-julia /Users/rob/.emacs.d/elpa/org-9.6.1/ob-lua hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lua /Users/rob/.emacs.d/elpa/org-9.6.1/ob-table hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table /Users/rob/.emacs.d/elpa/org-9.6.1/ob-ocaml hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml /Users/rob/.emacs.d/elpa/org-9.6.1/oc-csl hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc-csl /Users/rob/.emacs.d/elpa/org-9.6.1/ol-gnus hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-gnus /Users/rob/.emacs.d/elpa/org-9.6.1/org-indent hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent /Users/rob/.emacs.d/elpa/org-9.6.1/ob-lilypond hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond /Users/rob/.emacs.d/elpa/org-9.6.1/ob-matlab hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab /Users/rob/.emacs.d/elpa/org-9.6.1/org-datetree hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree /Users/rob/.emacs.d/elpa/org-9.6.1/ol-docview hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-docview /Users/rob/.emacs.d/elpa/org-9.6.1/oc-bibtex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/oc-bibtex /Users/rob/.emacs.d/elpa/org-9.6.1/ob-python hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python /Users/rob/.emacs.d/elpa/org-9.6.1/ob-makefile hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile /Users/rob/.emacs.d/elpa/org-9.6.1/org-duration hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-duration /Users/rob/.emacs.d/elpa/org-9.6.1/org-agenda hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda /Users/rob/.emacs.d/elpa/org-9.6.1/ob-dot hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot /Users/rob/.emacs.d/elpa/org-9.6.1/ob-js hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js /Users/rob/.emacs.d/elpa/org-9.6.1/ox-publish hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish /Users/rob/.emacs.d/elpa/org-9.6.1/org-inlinetask hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask /Users/rob/.emacs.d/elpa/org-9.6.1/ob-org hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org /Users/rob/.emacs.d/elpa/org-9.6.1/org-keys hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-keys /Users/rob/.emacs.d/elpa/org-9.6.1/ob-core hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core /Users/rob/.emacs.d/elpa/org-9.6.1/org-compat hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat /Users/rob/.emacs.d/elpa/org-9.6.1/ol hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol /Users/rob/.emacs.d/elpa/org-9.6.1/ox-odt hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt /Users/rob/.emacs.d/elpa/org-9.6.1/ol-info hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-info /Users/rob/.emacs.d/elpa/org-9.6.1/ob-plantuml hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml /Users/rob/.emacs.d/elpa/org-9.6.1/ob-eshell hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eshell /Users/rob/.emacs.d/elpa/org-9.6.1/ox-ascii hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii /Users/rob/.emacs.d/elpa/org-9.6.1/ox-koma-letter hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-koma-letter /Users/rob/.emacs.d/elpa/org-9.6.1/ob-maxima hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima /Users/rob/.emacs.d/elpa/org-9.6.1/org hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org /Users/rob/.emacs.d/elpa/org-9.6.1/ol-bbdb hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ol-bbdb /Users/rob/.emacs.d/elpa/org-9.6.1/org-macro hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro /Users/rob/.emacs.d/elpa/org-9.6.1/org-fold hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-fold /Users/rob/.emacs.d/elpa/org-9.6.1/ob-sql hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql /Users/rob/.emacs.d/elpa/org-9.6.1/org-attach hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach /Users/rob/.emacs.d/elpa/org-9.6.1/org-cycle hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-cycle /Users/rob/.emacs.d/elpa/org-9.6.1/ob-processing hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-processing /Users/rob/.emacs.d/elpa/org-9.6.1/ox-texinfo hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo /Users/rob/.emacs.d/elpa/org-9.6.1/org-crypt hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt /Users/rob/.emacs.d/elpa/org-9.6.1/org-footnote hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote /Users/rob/.emacs.d/elpa/org-9.6.1/ob-comint hides = /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint /Users/rob/.emacs.d/elpa/seq-2.20/seq hides = /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq Features: (shadow emacsbug two-column swift-mode swift-mode-imenu swift-mode-repl swift-mode-beginning-of-defun swift-mode-font-lock swift-mode-standard-types swift-mode-indent swift-mode-lexer timezone org-archive wombat-theme whiteboard-theme wheatgrass-theme tsdh-light-theme tsdh-dark-theme tango-theme modus-vivendi-tinted-theme modus-vivendi-theme modus-vivendi-deuteranopia-theme modus-operandi-tinted-theme modus-operandi-theme modus-operandi-deuteranopia-theme modus-themes misterioso-theme light-blue-theme leuven-theme manoj-dark-theme tango-dark-theme leuven-dark-theme dichromacy-theme deeper-blue-theme cus-theme facemenu descr-text help-fns cl-print novice cal-move sort find-dired org-duration conf-mode rust-utils rust-mode rust-rustfmt rust-playpen rust-compile rust-cargo rust-mode-autoloads loaddefs-gen radix-tree tar-mode arc-mode archive-mode mm-archive url-cache org-clock display-line-numbers pcmpl-unix octave sh-script smie executable finder lisp-mnt dabbrev vc-hg vc-bzr vc-src vc-sccs vc-cvs vc-rcs log-view vc bug-reference magit-extras magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff git-commit log-edit pcvs-util add-log magit-core magit-autorevert autorevert magit-margin magit-transient magit-process with-editor server magit-mode transient magit-git magit-section magit-utils crm rect grep cmake-mode rst misearch multi-isearch lsp-diagnostics company-oddmuse company-keywords company-etags etags fileloop company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb company edmacro kmacro lsp-headerline lsp-icons lsp-modeline dap-mouse dap-ui gdb-mi bindat gud bui bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils lsp-lens dap-mode dap-tasks dap-launch posframe dap-overlays lsp-ui lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline flycheck lsp-ui-util view lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-docker yaml lsp-dhall lsp-d lsp-css lsp-csharp lsp-crystal lsp-cmake lsp-clojure lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-interface treemacs-extensions treemacs-mouse-interface treemacs-tags treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-scope pulse treemacs-faces treemacs-icons treemacs-themes treemacs-core-utils pfuture hl-line treemacs-logging treemacs-customization treemacs-macros lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-astro lsp-ansible lsp-angular lsp-ada lsp-actionscript lsp-mode lsp-protocol tree-widget spinner network-stream markdown-mode lv inline ht f f-shortdoc shortdoc s dash dired-aux mail-extr diary-lib diary-loaddefs cal-iso face-remap vc-git diff-mode vc-dispatcher disp-table org-bullets org-indent oc-basic vc-svn ffap tramp tramp-loaddefs trampver tramp-integration cus-start files-x tramp-compat ls-lisp ol-w3m org-tempo tempo ol-rmail ol-mhe ol-irc ol-info org-habit ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec gnus-int gnus-range message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win ol-eww eww url-queue shr pixel-fill kinsoku url-file svg xml dom mm-url gnus nnheader gnus-util mail-utils range ol-doi org-link-doi ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ob-shell shell ob-python python compat treesit finder-inf eglot array filenotify jsonrpc ert ewoc debug backtrace xref flymake-proc flymake thingatpt warnings compile text-property-search project imenu cc-mode cc-fonts cc-guess cc-menus cc-cmds cl-extra yasnippet help-mode cc-styles cc-align cc-engine cc-vars cc-defs ivy flx delsel ivy-faces ivy-overlay colir color org-extra-emphasis easy-mmode pcase htmlfontify cus-edit pp cus-load wid-edit ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-download org-element org-persist xdg avl-tree generator org-attach org-id org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color ring org-list org-footnote org-faces org-entities time-date noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny async cap-words superword subword magit-autoloads magit-section-autoloads git-commit-autoloads ob-async-autoloads with-editor-autoloads transient-autoloads realgud-recursive-autoloads compat-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 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 nadvice seq simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 3510320 829670) (symbols 48 89796 169) (strings 32 495253 83331) (string-bytes 1 18215573) (vectors 16 216973) (vector-slots 8 3903593 548031) (floats 8 893 10048) (intervals 56 385549 717) (buffers 976 243)) From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 19:15:52 2023 Received: (at 62735-done) by debbugs.gnu.org; 9 Apr 2023 23:15:52 +0000 Received: from localhost ([127.0.0.1]:33924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pleGF-00038Z-Sh for submit@debbugs.gnu.org; Sun, 09 Apr 2023 19:15:52 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:53079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pleG3-00038B-Tt for 62735-done@debbugs.gnu.org; Sun, 09 Apr 2023 19:15:50 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 2489E2B06868; Sun, 9 Apr 2023 19:15:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 09 Apr 2023 19:15:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1681082132; x=1681085732; bh=YvT754rQz9TGeMbzF9pHx/Drt9ypzmKvtDg P2WxUajM=; b=FF+cwkHbno/aR7rhrFqIYAmFPU4IpqJhTEdeLLlGiXQA0hjvmNn QpDcJ4lm1UE/o4IJaDYoJ2cIwaiI9R2dZWcBAKVIHXu/HljQWjPl7QKcICNDPIV0 GhWAVqBBytqYFm3vZiSEobrH+UJiYnwsERY6BZ7ukaMVuJfRZPj1UIs4NsrX1Mgb 2W8KhT3oUX7hR/Kwc6UDg8t9ciSGpS6xOaOyV6jIw9nA4cIZU/TfTVhLXRd8d/Ne 629McCSK7rMiAXLV9L+ytKXtc0FqykF3h3qHn+gZCtcPaDoQDOpyLKm0b3CsjX/l Gjw4KP3lZXoQ1aHnZAiYquugNqVRGQF4Fdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1681082132; x= 1681085732; bh=YvT754rQz9TGeMbzF9pHx/Drt9ypzmKvtDgP2WxUajM=; b=V UKj9gkZubLBm3sbZKx/WHZhwu819W0WPRyG9YXxRbmek0teppbg/Jz+f5cBXHmWs DdglFjKaXJvx48ZlLJ5x4jzf20uY8YbIaoDSvhxyzmE5aBkPVFs4iqd00ZAJt6fo pE8h/2fAsXOdT0TuK91z6PxG4Ugm6jF2NiZhaF8+M82D4TjxfQiqUkAgISJkm4MO 1tjJhEc648G89/5HKl4iBTTX9Z3XWJzvjr53pBhbpq/6p+abwgoeD6pQg/LvC5VL AJ5UNsg2hVlDd3cjrngAgvEqiBuWFVweCdVaWOYCfWCMMfTn+a31iDNfD+5FISjm bwrTkOY/g8PIDTZfyIQDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekuddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeefjeekvedvfeelfedufeevgeetvdevkeelvddtueetteefudefgfduieekffei leenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Apr 2023 19:15:31 -0400 (EDT) Message-ID: <8ff8a1a3-a307-39e5-00c1-0934acbef058@gutov.dev> Date: Mon, 10 Apr 2023 02:15:29 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: bug#62735: 30.0.50; project.el project-search errors because project-files returns directories Content-Language: en-US To: Robert Nikander , 62735-done@debbugs.gnu.org References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 62735-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Version: 29.1 Hi! On 09/04/2023 00:45, Robert Nikander via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Hi, > > I tried to run the command `project-search`, documented in "29.2.1 Project Commands That Operate on Files”. It threw an error because it tried to process a directory. The backtrace from debugger is below. > > The function defined right below `project-search` in project.el is `project-query-replace-regexp`. It has this comment and line: > > ;; XXX: Filter out Git submodules, which are not regular files. > ;; `project-files' can return those, which is arguably suboptimal, > ;; but removing them eagerly has performance cost. > (cl-delete-if-not #'file-regular-p (project-files (project-current t))) > > I added the same to `project-search` and it seems to have “fixed” it. I don’t know how `project-files` works, but probably it would be better to fix that. > > This directory “…/SomeDir/“ has a .git directory inside it. That appears to be why project-files picked it up, because deleting that .git subdir also avoids the error. But projects should be able to have nested .git directories, depending on how the ‘project’ is defined. Thanks for the report. Am I correct to understand that the directory is a submodule? This is the main case which triggers this problem that I know about. I've pushed a similar fix just like you suggested. 'project-search' should be okay now. Note that 'project-find-regexp' (bound to 'C-x p g' by default) is usually a more efficient command to use rather than 'project-search' -- faster, works remotely, etc. But it has a very different interface. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 19:25:29 2023 Received: (at 62735-done) by debbugs.gnu.org; 9 Apr 2023 23:25:29 +0000 Received: from localhost ([127.0.0.1]:33932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plePZ-0003NU-1C for submit@debbugs.gnu.org; Sun, 09 Apr 2023 19:25:29 -0400 Received: from ms11p00im-qufo17282101.me.com ([17.58.38.58]:47496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plePW-0003NE-Ge for 62735-done@debbugs.gnu.org; Sun, 09 Apr 2023 19:25:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1681082720; bh=BXNzMF59k45ThZ6Lny4wWJzL5PTjGdbw5Nitb5o6UV0=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=YvzFXSUTi8XM36HRaDZ2tgsr82R9f3CrRd013n3vOGuLNIZsn5Isp5r714xlEd9vh 86xO8drBTo9wF7V6NOik4Qfw/x5Uc1WH/knqbGYc2+AHynzA5RM7xBQHb6OKeLUXsr jpMr+fR87dUANNwxePnOHJzV6s9IAMDUG2PRsXH1j3e/WpA9spLU/kg6mE2rfQCSZI 79SOZUWrAR5XG3WxLmg90I0kLf5XNLXuCWq/UfnophdHCBfosLX+f0eMiupicnlj+3 b39o4RjWj8y8mnGv1dCVCddyflCdrK8EwMOG0Fbjl3+21EU9pbpuSfwI74Eft9ncYq ZEJMCYQ7f3Wvg== Received: from smtpclient.apple (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17282101.me.com (Postfix) with ESMTPSA id 157E18C011F; Sun, 9 Apr 2023 23:25:19 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: bug#62735: 30.0.50; project.el project-search errors because project-files returns directories From: Robert Nikander In-Reply-To: <8ff8a1a3-a307-39e5-00c1-0934acbef058@gutov.dev> Date: Sun, 9 Apr 2023 17:25:07 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8ff8a1a3-a307-39e5-00c1-0934acbef058@gutov.dev> To: Dmitry Gutov X-Mailer: Apple Mail (2.3731.500.231) X-Proofpoint-GUID: EaGDmlOkApdsHklsqhCFdlBhU5mQUAXq X-Proofpoint-ORIG-GUID: EaGDmlOkApdsHklsqhCFdlBhU5mQUAXq X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.816,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2022-01-14=5F01,2022-01-18=5F01,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 clxscore=1011 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2304090215 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 62735-done Cc: 62735-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Dmitry, I don=E2=80=99t think it=E2=80=99s a submodule anymore. The directory = does have a .git folder in it though (like a submodule). The directory = was simply copied into the project tree like that, as part of moving it = between projects. There is no '.gitmodules' file anywhere. So my guess = is this bug was being triggered by the mere existence of the .git = directory nested a few layers down in my project. That .git directory is = not going to stay there, it=E2=80=99s going to get deleted, but of = course it still shouldn=E2=80=99t crash the emacs command. Rob > On Apr 9, 2023, at 5:15 PM, Dmitry Gutov wrote: >=20 > Version: 29.1 >=20 > Hi! >=20 > On 09/04/2023 00:45, Robert Nikander via Bug reports for GNU Emacs, = the Swiss army knife of text editors wrote: >> Hi, >> I tried to run the command `project-search`, documented in "29.2.1 = Project Commands That Operate on Files=E2=80=9D. It threw an error = because it tried to process a directory. The backtrace from debugger is = below. >> The function defined right below `project-search` in project.el is = `project-query-replace-regexp`. It has this comment and line: >> ;; XXX: Filter out Git submodules, which are not regular files. >> ;; `project-files' can return those, which is arguably = suboptimal, >> ;; but removing them eagerly has performance cost. >> (cl-delete-if-not #'file-regular-p (project-files = (project-current t))) >> I added the same to `project-search` and it seems to have =E2=80=9Cfixe= d=E2=80=9D it. I don=E2=80=99t know how `project-files` works, but = probably it would be better to fix that. >> This directory =E2=80=9C=E2=80=A6/SomeDir/=E2=80=9C has a .git = directory inside it. That appears to be why project-files picked it up, = because deleting that .git subdir also avoids the error. But projects = should be able to have nested .git directories, depending on how the = =E2=80=98project=E2=80=99 is defined. >=20 > Thanks for the report. Am I correct to understand that the directory = is a submodule? This is the main case which triggers this problem that I = know about. >=20 > I've pushed a similar fix just like you suggested. 'project-search' = should be okay now. >=20 > Note that 'project-find-regexp' (bound to 'C-x p g' by default) is = usually a more efficient command to use rather than 'project-search' -- = faster, works remotely, etc. But it has a very different interface. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 19:32:38 2023 Received: (at 62735-done) by debbugs.gnu.org; 9 Apr 2023 23:32:38 +0000 Received: from localhost ([127.0.0.1]:33938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pleWU-0003YS-31 for submit@debbugs.gnu.org; Sun, 09 Apr 2023 19:32:38 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:55669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pleWT-0003YG-1n for 62735-done@debbugs.gnu.org; Sun, 09 Apr 2023 19:32:37 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 367EC2B06723; Sun, 9 Apr 2023 19:32:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 09 Apr 2023 19:32:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1681083150; x=1681086750; bh=KHJ3LqaUvftzfTN8NHb8y4prpBb8pmx0JLb P2ghO55E=; b=VUjb8ZmUPVLmhagjvT3Xx/kycVkuh36jn4ie4GHq7AsoEYYK+Ac Wuhtg1Yb6LZ/fSkgHxmSp7QFbYk/2FYYGfrLCbFsggD9/3aUsNeVHqBlXQVBK8BF GjeSqtf/tdRw9xV74hupVTJ+Ghg86XewQSyNV451HlImz/8ljQYKPKmkjsg6doqn xnet3rfRK7IZOejz3H1edxu9rH+gAAKKD+Hj1be7czPWpsyx9ugGABR3RXErza91 QMq/enBIt3JyaGOXJOSzDOhhp3ed4H4mM1x+rZOO3WAs6mpZ9UkTNZiycG1jKMEA Ks83Pxi1Yd/hcUYa6g5RhYKUQYW87s4oynA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1681083150; x=1681086750; bh=KHJ3LqaUvftzfTN8NHb8y4prpBb8pmx0JLb P2ghO55E=; b=TzXeLz3NWUBFnE6ScSrDbkF//M1UUHGhL352BjSOBFy440UI/Nz kkneHB8EOLhJN4jKEgKJaMTtwdH3zb//odISom6xkWODKnw84Rkc2WCpY8GIO0B0 E/075NcxR7ZR4dRtR5FI5M7s7Is2AtZuDmPY2vCa46dNLPR+XWFQl3j0WwPxOIpu CaztRP8fYlhsSwyn52bxrkVzgfYO05q2jHiB8y/3K6yEh9vcVv6y3WW5xpavqwoG C347wzan9HTFEyMVFxHFjGPXO/ln8uL84V3wBuuq3rwuv56veYZgxjgWSBML0ipv j2s5i+d2BpizNq+wT7NoD0Hkp6WowmQbOig== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekuddgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Apr 2023 19:32:29 -0400 (EDT) Message-ID: Date: Mon, 10 Apr 2023 02:32:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: bug#62735: 30.0.50; project.el project-search errors because project-files returns directories Content-Language: en-US To: Robert Nikander References: <8ff8a1a3-a307-39e5-00c1-0934acbef058@gutov.dev> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 62735-done Cc: 62735-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) On 10/04/2023 02:25, Robert Nikander wrote: > I don’t think it’s a submodule anymore. The directory does have a .git folder in it though (like a submodule). The directory was simply copied into the project tree like that, as part of moving it between projects. There is no '.gitmodules' file anywhere. So my guess is this bug was being triggered by the mere existence of the .git directory nested a few layers down in my project. That .git directory is not going to stay there, it’s going to get deleted, but of course it still shouldn’t crash the emacs command. All right. So it's a different situation, but one we shouldn't have to try to support since it's going to be fixed manually. But the same thing can happen when submodules are used, so the fix is still useful. Good to know this is still the main case where we might need to filter by file type. From unknown Sun Jun 22 07:31:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 08 May 2023 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator