~protesilaos/dotfiles

1

prot-project: project-current fails to me

Details
Message ID
<87o7zl6h2f.fsf@nadanix.com>
DKIM signature
missing
Download raw message
Some of your `prot-project-*` commands relies on (project-current t) to
get working directory.

But they are failing for me because (project-current t) returns (vc Git
"~/Git/Projects/dotfiles/") to me, so (cdr) is not enough to extract the dirname.

The full error is:

Debugger entered--Lisp error: (wrong-type-argument stringp (Git "~/Git/Projects/dotfiles/"))
  expand-file-name((Git "~/Git/Projects/dotfiles/"))
  magit--safe-default-directory((Git "~/Git/Projects/dotfiles/"))
  magit-toplevel((Git "~/Git/Projects/dotfiles/"))
  magit-status((Git "~/Git/Projects/dotfiles/"))
  (let* ((pr (project-current t)) (dir (cdr pr))) (magit-status dir))
  prot-project-magit-status()
  funcall-interactively(prot-project-magit-status)
  project-switch-project("~/Git/Projects/dotfiles/")
  funcall-interactively(project-switch-project "~/Git/Projects/dotfiles/")
  command-execute(project-switch-project)

Can you help me to debug this error?
-- 
Juanjo Presa
https://nadanix.com
Details
Message ID
<878rqpq30a.fsf@protesilaos.com>
In-Reply-To
<87o7zl6h2f.fsf@nadanix.com> (view parent)
DKIM signature
missing
Download raw message
> From: Juanjo Presa <juanjo.presa@nadanix.com>
> Date: Wed, 25 May 2022 12:29:44 +0200
>
> Some of your `prot-project-*` commands relies on (project-current t) to
> get working directory.

I was aware of this but never had the time to review it.

> Can you help me to debug this error?

Please test commit 6920544c.

-- 
Protesilaos Stavrou
https://protesilaos.com
Reply to thread Export thread (mbox)