[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: browse-url-of-buffer broken at HEAD?
From: |
T.V Raman |
Subject: |
Re: browse-url-of-buffer broken at HEAD? |
Date: |
Wed, 06 May 2020 14:29:00 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Tassilo Horn <address@hidden> writes:
Note the error I was seeing in *Messages* was different, it was
"File exists but cannot be read" or something similar
it's gone now.
> "T.V Raman" <address@hidden> writes:
>
>> Thanks!
>
> Ok, it's the handler for opening all file:// URLs using browse-url-emacs
> which basically just visits them using find-file. With commit
> 86fef6ab89 I've added another default handler before that which matches
> file://.*\.html? URLs and opens those with browse-url-browser-function.
> So it should work as you are accustomed again.
>
> The error
>
> File mode specification error: (file-missing Setting current directory No
> such file or directory file:///tmp/)
>
> is not my fault but I also get it when evaling
>
> (browse-url-emacs "file:///tmp/burl6qUEJq.html")
>
> ...
>
> Ok, I found the culprit in my customization. The buffer gets opened in
> html-mode which inherits from prog-mode and in prog-mode-hook I enable
> bug-reference-mode. Inside bug-reference-mode-hook I have a function
> which sets bug-reference-bug-regexp and bug-reference-url-format
> depending on things like the current Gnus group or the current buffer
> file's VCS URL. For the latter, it does
>
> (shell-command-to-string "git ls-remote --get-url")
>
> and that (or rather call-process called somewhere deeper in the stack)
> barfs if default-directory is a file:///tmp/ URL.
>
> I'm not sure if this is a bug but I think so. I'll report it.
>
> Thanks,
> Tassilo
>
--