From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: RFC: Make ~/.mailcap override other settings Date: Thu, 12 Apr 2018 23:22:24 +0200 Organization: Programmerer Ingebrigtsen Message-ID: <87zi28f7cf.fsf@mouse.gnus.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523568077 31208 195.159.176.226 (12 Apr 2018 21:21:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2018 21:21:17 +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 Thu Apr 12 23:21:10 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 1f6jeX-0007tZ-Tn for ged-emacs-devel@m.gmane.org; Thu, 12 Apr 2018 23:21:10 +0200 Original-Received: from localhost ([::1]:44465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6jge-0007fl-Ja for ged-emacs-devel@m.gmane.org; Thu, 12 Apr 2018 17:23:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6jfy-0007f2-3k for emacs-devel@gnu.org; Thu, 12 Apr 2018 17:22:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6jfu-000764-Ue for emacs-devel@gnu.org; Thu, 12 Apr 2018 17:22:38 -0400 Original-Received: from [195.159.176.226] (port=53018 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6jfu-00074a-MG for emacs-devel@gnu.org; Thu, 12 Apr 2018 17:22:34 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f6jdl-0006nc-3R for emacs-devel@gnu.org; Thu, 12 Apr 2018 23:20:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:42OJEKvRWZ3cnKa9nKd+ZKwd/vo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:224532 Archived-At: 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? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no