From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: browse-url-of-buffer broken at HEAD? Date: Wed, 06 May 2020 23:06:00 +0200 Message-ID: <87a72k3haf.fsf@gnu.org> References: <20200506174403.3EAB0C221CE@raman-glaptop.localdomain> <87h7ws3lcp.fsf@gnu.org> <24243.5486.257862.757579@retriever.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="8770"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 06 23:06:53 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWRFl-0002DJ-QX for ged-emacs-devel@m.gmane-mx.org; Wed, 06 May 2020 23:06:53 +0200 Original-Received: from localhost ([::1]:55702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWRFk-0000jc-Rp for ged-emacs-devel@m.gmane-mx.org; Wed, 06 May 2020 17:06:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWRFE-0000IE-4W for emacs-devel@gnu.org; Wed, 06 May 2020 17:06:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35587) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWRFD-0005Bs-RA; Wed, 06 May 2020 17:06:19 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:49657) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jWREx-0008Ok-QA; Wed, 06 May 2020 17:06:19 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 6885427C0054; Wed, 6 May 2020 17:06:03 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 06 May 2020 17:06:03 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeekgdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnheptd elieffkeeuffduueeffefhiedtjeeutdeuveegfffgtdejleekheegkeetkeevnecukfhp peekgedrudefvddruddtkedrvdefheenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgr lhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgse hfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from thinkpad-t440p (p54846ceb.dip0.t-ipconnect.de [84.132.108.235]) by mail.messagingengine.com (Postfix) with ESMTPA id 9EAAA3066129; Wed, 6 May 2020 17:06:02 -0400 (EDT) Mail-Followup-To: "T.V Raman" , emacs-devel@gnu.org In-Reply-To: <24243.5486.257862.757579@retriever.mtv.corp.google.com> (T. V. Raman's message of "Wed, 6 May 2020 12:52:14 -0700") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249123 Archived-At: "T.V Raman" 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