bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33394: 27.0.50; trampver cannot determine repository version


From: Geoffrey Ferrari
Subject: bug#33394: 27.0.50; trampver cannot determine repository version
Date: Thu, 15 Nov 2018 11:56:24 +0000

Thanks Michael. On further investigation, I've found that this minimal code (after starting with emacs -Q) produces the same unexpected error:

(condition-case nil
(emacs-repository-get-branch nil)
  (error nil))

I don't think I can investigate further as condition-case is not a lisp function.

Kind regards

Geoff

On Thu, 15 Nov 2018 at 11:40, Michael Albinus <michael.albinus@gmx.de> wrote:
Geoffrey Ferrari <geoffrey.ferrari@oriel.oxon.org> writes:

Hi Geoffrey,

> The issue can be traced to the definition of tramp-repository-branch
> in
> trampver.el. This calls:
>
> (emacs-repository-get-branch
> (locate-dominating-file (locate-library "tramp") ".git"))
>
> However, (locate-dominating-file (locate-library "tramp") ".git")
> evaluates to nil, meaning that above is equivalent to
> (emacs-repository-get-branch nil).
>
> This causes the function emacs-repository-get-branch (in version.el)
> to
> rely on the variable source-directory i.e. which references the source
> directory where the emacs
> binary was built, which of course does not exist on an end user's
> system.

Yes. However, the initial value of tramp-repository-branch is

--8<---------------cut here---------------start------------->8---
  (ignore-errors
    ;; Suppress message from `emacs-repository-get-branch'.
    (let ((inhibit-message t))
      ;; `emacs-repository-get-branch' has been introduced with Emacs 27.1.
      (with-no-warnings
        (emacs-repository-get-branch
         (locate-dominating-file (locate-library "tramp") ".git")))))
--8<---------------cut here---------------end--------------->8---

I'm wondering why you see an error, although the code is wrapped by
`ignore-errors'.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]