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: [Patch/Question] Likely bugs in mailcap docs and mailcap-view-file Date: Sat, 15 Jan 2022 11:27:30 +0100 Message-ID: <87v8yljnbs.fsf@gnu.org> References: <875yqmvvx1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.5; emacs 29.0.50 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 15 11:41:24 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 1n8gUt-0005FH-D9 for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jan 2022 11:41:23 +0100 Original-Received: from localhost ([::1]:60468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8gUs-0006pi-3P for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jan 2022 05:41:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8gSB-00057r-Iw for emacs-devel@gnu.org; Sat, 15 Jan 2022 05:38:37 -0500 Original-Received: from [2001:470:142:3::e] (port=56208 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8gSB-0001p4-3f; Sat, 15 Jan 2022 05:38:35 -0500 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=lxAn3bB742vh4X8qBeMnt/KQ32AA8eauK8cKc7AgyEs=; b=aHzKZjdgi3X053 NL2+bCBF9U2QsZhb9hdCFBAKpowIMfvOAx2/jqNzeU2sUF72tpSyXf6tu3AwQ+RBqMHmmg3kxWreH k1YeP8siI8h0qLYPVYB9JDCBnSsSvQAdYeER7o583GGn1ono9GILH6XjBwaG+UPdM0PPJxRC2JsFW QBGD+M7gWwU0sIpg5EypqxSViayON19sRc5IQKYfFhCiQYUHMWy6+kj+EqH3jJ+NRI3t5MAyBo/8Q mBSSi6Nl3yljdEvAmsUdRqisPfVGHx1dUz4sfBkECmLhe5A5zXM0dc9mGBzWpbJNF9MMjE5WHpjfn W4ZpxtPr9s/+FnRjm1sQ==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:40899) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8gSB-000361-98; Sat, 15 Jan 2022 05:38:35 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 22D1C27C0054; Sat, 15 Jan 2022 05:38:34 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 15 Jan 2022 05:38:34 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdejgddukecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeevve eikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Jan 2022 05:38:33 -0500 (EST) In-reply-to: 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:284773 Archived-At: Stefan Monnier writes: Hi Stefan, >> So I propose the attached patch which teaches `mailcap-view-file' the >> symbol/function-valued viewer case and adjust the docs to match >> what's already there. > [...] >> Does anyone see a problem with that? I'm not very familiar with that >> code. > > I'm not familiar either, but it looks OK. Alright, thanks for checking. Pushed! > Any chance you could be convinced to throw in some regression test? Of course. I think I can write some tests that the viewer selection procedure works as intended. Is that what you have in mind? Wrt. the changed function: I'm not exactly sure how I would test that. I can probably test that the right viewer function is selected and run on the right buffer but would skip the display stuff, i.e., that the generated buffer is visible in some window. Bye, Tassilo