From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: browse-url-of-buffer broken at HEAD? Date: Wed, 06 May 2020 14:29:00 -0700 Message-ID: References: <20200506174403.3EAB0C221CE@raman-glaptop.localdomain> <87h7ws3lcp.fsf@gnu.org> <24243.5486.257862.757579@retriever.mtv.corp.google.com> <87a72k3haf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="111250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 06 23:30:08 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 1jWRcF-000SqI-OW for ged-emacs-devel@m.gmane-mx.org; Wed, 06 May 2020 23:30:07 +0200 Original-Received: from localhost ([::1]:49698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWRcE-0003pG-NQ for ged-emacs-devel@m.gmane-mx.org; Wed, 06 May 2020 17:30:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWRbI-0002lM-Nr for emacs-devel@gnu.org; Wed, 06 May 2020 17:29:08 -0400 Original-Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:34300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWRbF-0006j3-On for emacs-devel@gnu.org; Wed, 06 May 2020 17:29:08 -0400 Original-Received: by mail-pf1-x435.google.com with SMTP id x15so1787621pfa.1 for ; Wed, 06 May 2020 14:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=F8WCAkW5aF0WtM0uedy663TMfEYp1Gdt4ZEjtWmw7ck=; b=c9UCpp0HyXag5iAY3m7AGgPTg15LfdtJrLbFqisecRt5J45CoV3t7QnZ5FuHQ43Uq/ cr572+8w0qq3enZgTQtRpn9GZbv2cA8clt9cUp5nmMna3BDrIwuTp6W5TeNPGYMBk4CN AxgEKtphB/NILvB1Ulf1SBshu4oniBr1JrBmrGG1bzsySwhw2E/cESLhi3ZEkZlrZHIm jmwTyUg3t3gzJo7XKcdavgNY2MOacHEQk+0S3ADnQoMhYIt8qCJrz51Xxm8YYwBkyn85 SVshiYFQsG97sztBpMPOSNyCpbr4W00ngQfCtbbBIXiGMyRp2hu/6rTCoS65CG89gZh7 8qVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=F8WCAkW5aF0WtM0uedy663TMfEYp1Gdt4ZEjtWmw7ck=; b=IHjl4oODZF4fBWb3VWmAjyqb8jKv7MfHUj5s5eAoBJckxWo3MmG52p9kWqILMiLCuz PcC4ssxXZu8LFg2/T8ZApV2KC/r+S7o/PYVTnrQtvytonMPwNRNOB/K0WTNeCbYiSmXU joW/hxLUxf7gEg7S33sLOfKzb+TapohgmJLaTVzCn1e+yBqRcfyb/v0QnrHjEeiE4mey HUo74TlCmfV8NWgvJfu+KyxtAWAXx3JOlm1f9sKKhLQot4s3XJOPe+3/MJspAasHeSWb SWbEfyG225SNOaGIN5/XRkpDERf4Jq/732b0xJpqKXXJvwiu8bzGjZcQnbnIPEb5EvWT xM2g== X-Gm-Message-State: AGi0PuaJQygKGAp2DGMS4BakxNFtv7B8UxXkGYt1cZTtKrLDkBkPITZr lh7E6wMTayH8+sBBDa7B+cPFOqyYNW2x8A== X-Google-Smtp-Source: APiQypLTkCENxGAln0ExsvIRt4Mwke7vpdUyqXxaDw1K1VrtUMvtfiHuiVWbPzZrDLKDGL4p1DaEag== X-Received: by 2002:a63:314b:: with SMTP id x72mr8922327pgx.362.1588800543404; Wed, 06 May 2020 14:29:03 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id gv24sm5587649pjb.6.2020.05.06.14.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 14:29:01 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id 6981AC20F91; Wed, 6 May 2020 14:29:00 -0700 (PDT) In-Reply-To: <87a72k3haf.fsf@gnu.org> (Tassilo Horn's message of "Wed, 06 May 2020 23:06:00 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=raman@google.com; helo=mail-pf1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=_AUTOLEARN X-Spam_action: no action 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:249126 Archived-At: Tassilo Horn 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" 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 > --