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 wrote: > Geoffrey Ferrari 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. >