From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: browse-url and URL handlers (MS-Windows) Date: Wed, 05 Oct 2022 10:11:54 +0200 Message-ID: <87czb61xv1.fsf@gnu.org> References: <825yh1b5si.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.1; emacs 29.0.50 Cc: emacs-devel@gnu.org To: pquessev@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 05 10:29:39 2022 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 1ofzmd-0006hr-Mh for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 10:29:39 +0200 Original-Received: from localhost ([::1]:57398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofzmb-0002Qh-O2 for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 04:29:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofziL-0000eD-Iw for emacs-devel@gnu.org; Wed, 05 Oct 2022 04:25:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofziH-0006Zv-I1; Wed, 05 Oct 2022 04:25:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=6NdDGjNzn1kL3xpsSMNTp51W369pedAkfmtptYJSQT0=; b=D5xSd6bNKnLV7n wPn9gaL00c5zQTcEYYwT/VG+lhyAXKpTAwbKUlnoQ+Ev8xbicXpuZ4Ma6ou4XxCOTBr495FFD6IF5 VxfRhgT0Rxp6XrFCOAeW+zlcNmmqNJpiA3x2VHaO4eVnG9SLRqRTi4uGr3K+GGy9Mgz6SOlyl89cw qbefPWpHbvlmc3zWzbODLpUhjcqQvv12Q9lOFhm99eyyUdjYkeSNVVeODLZ9AK9CNup0hNQC8u+hq Fxtbv6EWIh+YfsegOw6YC485zimeeBIzZYstrSWwyKPrLLM5OkwkvqYKD91fuYnIlPRBGSDqnbZel cUl6MISlnXAZkV3h8YYQ==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:60353) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofzi2-0003MM-RT; Wed, 05 Oct 2022 04:25:07 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id B100227C005A; Wed, 5 Oct 2022 04:24:53 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 05 Oct 2022 04:24:53 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeifedgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecuggftrfgrthhtvghrnhepudejtdehuddvleffjeekteegvdehleehvdeufe fhueekkeekhedvgfeggeffvefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlih hthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgr shhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Oct 2022 04:24:53 -0400 (EDT) In-reply-to: <825yh1b5si.fsf@gmail.com> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:296947 Archived-At: Pascal Quesseveur writes: Hi Pascal, > With 28.1 it appears that my function is no longer called. It seems to > me it comes from the fact that browse-url uses > browse-url-default-handlers which is defined as: > > (("\\`mailto:" . browse-url--mailto) > ("\\`man:" . browse-url--man) > (browse-url--non-html-file-url-p . browse-url-emacs)) Yes, your analysis is correct. > That means that for a URL which is not identified as HTML browse-url > calls browse-url-emacs. Not quite: browse-url--non-html-file-url-p is non-nil only for file:// URLs which target a non-HTML file. In that case, browse-url-emacs will find the file in the respective mode, e.g., image-mode for images. That doesn't seem awfully wrong to me. It prefers opening files in emacs rather than external programs, that's for sure. But if you prefer having them opened by the preferred windows program, add (setq browse-url-handlers '((browse-url--non-html-file-url-p . browse-url-default-windows-browser))) to your init file. If you feel that the default value is totally wrong, please file a bug report so that this can be discussed. Bye, Tassilo