From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Make browser windows pop up when browsing URLs on Wayland Date: Tue, 24 Dec 2024 01:39:37 -0500 Message-ID: References: <20241223192320.39021-1-dancol@dancol.org> <87y105ocjz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9932"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 24 07:40:56 2024 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 1tPyb9-0002Pp-Do for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Dec 2024 07:40:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPya5-00047F-Ap; Tue, 24 Dec 2024 01:39:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPya2-000471-3Y for emacs-devel@gnu.org; Tue, 24 Dec 2024 01:39:46 -0500 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPyZz-0004R3-Hq; Tue, 24 Dec 2024 01:39:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=g6GbwPOonwSh4UlRv/AVVTWuyV3Y5MP5fXxquJO5Uq0=; b=RN3DJADCJa6CwjiZrFwsUt45SI ngV4kk/26j9uKSxSa9lh+7fYAwKBGnLRnYWAXM2YlgcxzHhhhgC8vqits0U8MM6l4aWbmp8d1TtA6 an9B9k6MD0w7MC5LwkEijgu//YO5DRtpGuMst0sIxzuXe3lmrKrh9Hhvy7L3Qss4SGpFIIPBQw17U W2forPvlee5AWXlA+1vKnNSiXk81Qvkf9G0bobm7R1jw+f3IUDkhq3hUUIQqDRTWhZHQl86g+bDlh CRRwoTHYP91aFUlo2R2bg4pEkPFU9v0kEpYzQxKB85z3hsfL6T7H7EpksyWhcbDuLJGfCRfMgxp+u 24+MhOVQ==; Original-Received: from 2603-9001-4203-1ab2-4646-3798-d455-126a.inf6.spectrum.com ([2603:9001:4203:1ab2:4646:3798:d455:126a]:39710 helo=[IPv6:::1]) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tPyZw-0008T3-1L; Tue, 24 Dec 2024 01:39:40 -0500 In-Reply-To: <87y105ocjz.fsf@gnu.org> Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326967 Archived-At: On December 24, 2024 12:49:36 AM EST, Tassilo Horn wrote: >Daniel Colascione writes: > >Hi Daniel, > >> We really should consider simplifying the whole browse-url mechanism >> by eliminating browse-url-default-browser and the distinction between >> browse-url-handlers and browse-url-default-handlers=2E Instead, >> browse-url-handlers should have a simple list of predicated handlers >> just like display-buffer-alist=2E > >The reason there's browse-url-default-handlers and browse-url-handlers >is that the former is meant for Emacs itself and packages whereas the >latter is meant for the user to customize=2E IIRC, Stefan Monnier >suggested that distinction back then when I added the handlers and I >still don't see a better way=2E If there was only the defcustom >browse-url-handlers, either packages couldn't sensibly add to it or if >they did, users wouldn't be sensibly able to override what packages >added=2E Or if a package added an entry which the user then saved, how >would that be removed when the package was removed? > >That's different with display-buffer-alist which is nil by default and >it's not expected that packages add rules to it=2E In contrast, if I'd >write a gemini client for emacs, it's quite obvious that I'd add an >entry matching gemini:// urls with my hander to >browse-url-default-handlers=2E > >Bye, >Tassilo You could say the same of hooks, yes? Or auto-mode-alist? Customization could work by associating each entry with a priority --- 20,= 50, 90, etc=2E --- and merging user-provided entries (and whiteouts to dis= able certain pre-existing entries) with package supplied entries=2E This wa= y, we end up with a simple, single approach to finding the handler for a UR= L: go down the list in priority order (breaking ties arbitrarily) and use t= he first handler that says "yes, I handle this URL"=2E