From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: RFC: Make ~/.mailcap override other settings Date: Fri, 13 Apr 2018 10:21:46 +0200 Message-ID: <871sfjsehx.fsf@chopper> References: <87zi28f7cf.fsf@mouse.gnus.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523608233 7695 195.159.176.226 (13 Apr 2018 08:30:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2018 08:30:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 13 10:30:29 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6u6D-0001p6-Td for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2018 10:30:26 +0200 Original-Received: from localhost ([::1]:34325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6u8K-0006xS-IB for ged-emacs-devel@m.gmane.org; Fri, 13 Apr 2018 04:32:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6u7S-0006tj-K8 for emacs-devel@gnu.org; Fri, 13 Apr 2018 04:31:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6u7O-0003VG-MJ for emacs-devel@gnu.org; Fri, 13 Apr 2018 04:31:42 -0400 Original-Received: from smtp.outgoing.loopia.se ([194.9.95.112]:46094) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f6u7O-0003T4-F2 for emacs-devel@gnu.org; Fri, 13 Apr 2018 04:31:38 -0400 Original-Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 4D52D1273FB7 for ; Fri, 13 Apr 2018 10:31:35 +0200 (CEST) Original-Received: from s499.loopia.se (unknown [172.21.200.97]) by s554.loopia.se (Postfix) with ESMTP id 2EFE15F14C6 for ; Fri, 13 Apr 2018 10:31:35 +0200 (CEST) Original-Received: from s405.loopia.se (unknown [172.21.200.105]) by s499.loopia.se (Postfix) with ESMTP id 6574E13588CC for ; Fri, 13 Apr 2018 10:21:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se Original-Received: from s499.loopia.se ([172.21.200.105]) by s405.loopia.se (s405.loopia.se [172.21.200.135]) (amavisd-new, port 10024) with LMTP id ZovgI5fzxTjm for ; Fri, 13 Apr 2018 10:21:46 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: joakim.verona@chimeslab.se X-Loopia-Originating-IP: 81.170.223.63 Original-Received: from localhost.localdomain (h-223-63.A149.priv.bahnhof.se [81.170.223.63]) (Authenticated sender: joakim.verona@chimeslab.se) by s499.loopia.se (Postfix) with ESMTPSA id 7E684135543D for ; Fri, 13 Apr 2018 10:21:46 +0200 (CEST) In-Reply-To: <87zi28f7cf.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 12 Apr 2018 23:22:24 +0200") X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 194.9.95.112 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224539 Archived-At: Lars Ingebrigtsen writes: > Since, well, forever, Emacs has had several sources for information > about how to display files, like /etc/mailcap, ~/.mailcap and the > `mailcap-mime-data' variable. > > But Emacs' handling of priorities here has never felt quite right, and > they have historical reasons: In olden days, some distributions put a > copy of /etc/mailcap into ~/.mailcap, so you didn't really know what the > system preferences were and what the user's preferences were. > > So mailcap.el used the following precedence algorithm: > > 1) If it's in `mailcap-mime-data', use that. > > 2) If a specific type, say, "image/gif" is in both /etc/mailcap and > ~/.mailcap, make the ~/.mailcap version win. > > 3) If we have less specific types covering the same type, make the most > specific win. So if /etc/mailcap has "image/gif; xv" and ~/.mailcap has > "image/*; feh", then "image/gif" wins because it's more specific. > > I don't really think this ever made much sense. I think if the user has > put "image/*; feh" into ~/.mailcap, then that should win. > > So I propose to make this change on master. It's backward-incompatible, > but will lead to a lot less confusion in the years ahead. > > What do all y'all think? I feel like I'm having trouble with this every time I want to view an attachment, so FWIW, I'm for change in this area. -- Joakim Verona joakim@verona.se