all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Damien Cassou <damien@cassou.me>
To: 65704@debbugs.gnu.org
Subject: bug#65704: [PATCH] project.el: Fix bug in project-ignores
Date: Sat, 02 Sep 2023 18:17:33 +0200	[thread overview]
Message-ID: <87o7iklfc2.fsf@cassou.me> (raw)
In-Reply-To: <87sf7wlg07.fsf@cassou.me>

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

In case what I said in the issue's description is correct, please find
attach a possible patch.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-project.el-Fix-bug-in-project-ignores.patch --]
[-- Type: text/patch, Size: 1162 bytes --]

From f04731cc2a31510163dc2ed484f47467ea88f036 Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
Date: Sat, 2 Sep 2023 18:08:49 +0200
Subject: [PATCH] project.el: Fix bug in project-ignores

The variable `backend' was always nil preventing the 25-line long
`when' block to do anything. This bug seems to have been introduced in commit
785fa801596ad7bb9f838cac865f00de29e253d1 "New user option:
project-vc-extra-root-markers". (Bug#65704)

* lisp/progmodes/project.el: (project-ignores) Use backend-specific
code if possible.
---
 lisp/progmodes/project.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 37db677943a..29a81c7e151 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -733,11 +733,10 @@ project--git-submodules
 
 (cl-defmethod project-ignores ((project (head vc)) dir)
   (let* ((root (nth 2 project))
-         backend)
+         (backend (cadr project)))
     (append
      (when (and backend
                 (file-equal-p dir root))
-       (setq backend (cadr project))
        (delq
         nil
         (mapcar
-- 
2.41.0


  reply	other threads:[~2023-09-02 16:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 16:03 bug#65704: 29.1; Most code of `project-ignores' seems to be dead code Damien Cassou
2023-09-02 16:17 ` Damien Cassou [this message]
2023-09-03  0:26 ` Dmitry Gutov
2023-09-04 16:03   ` Damien Cassou
2023-09-04 18:30     ` Dmitry Gutov
2023-09-04 20:11       ` Damien Cassou
2023-09-04 20:17         ` Dmitry Gutov
2023-09-05  7:58           ` Damien Cassou
2023-09-05 14:09             ` Dmitry Gutov
2023-09-05 20:22               ` Damien Cassou
2023-09-06 19:12               ` Damien Cassou
2023-09-06 21:16                 ` Dmitry Gutov
2023-09-04 18:31   ` Dmitry Gutov
2023-09-04 18:48     ` Eli Zaretskii
2023-09-04 18:58       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7iklfc2.fsf@cassou.me \
    --to=damien@cassou.me \
    --cc=65704@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.