From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2PXYK3EF32A6DgEAgWs5BA (envelope-from ) for ; Fri, 02 Jul 2021 14:24:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oN6pJ3EF32CpHwAA1q6Kng (envelope-from ) for ; Fri, 02 Jul 2021 12:24:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 052B620D27 for ; Fri, 2 Jul 2021 14:24:16 +0200 (CEST) Received: from localhost ([::1]:34060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzIDN-00065i-NK for larch@yhetil.org; Fri, 02 Jul 2021 08:24:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzICE-00062h-Q4; Fri, 02 Jul 2021 08:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzICE-0001fh-DG; Fri, 02 Jul 2021 08:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lzICE-0004GS-Ax; Fri, 02 Jul 2021 08:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#12972: [PATCH] Avoid regression in mailcap-view-file similar to Bug#44824 Resent-From: Maxim Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Fri, 02 Jul 2021 12:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12972 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: patch To: 12972@debbugs.gnu.org Received: via spool by 12972-submit@debbugs.gnu.org id=B12972.162522852616313 (code B ref 12972); Fri, 02 Jul 2021 12:23:02 +0000 Received: (at 12972) by debbugs.gnu.org; 2 Jul 2021 12:22:06 +0000 Received: from localhost ([127.0.0.1]:35186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzIBJ-0004F3-Sq for submit@debbugs.gnu.org; Fri, 02 Jul 2021 08:22:06 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:36700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzIBH-0004EY-Hb for 12972@debbugs.gnu.org; Fri, 02 Jul 2021 08:22:04 -0400 Received: by mail-lf1-f42.google.com with SMTP id d16so17728978lfn.3 for <12972@debbugs.gnu.org>; Fri, 02 Jul 2021 05:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lebDnOxcgbHY/ONBaRsvdirSXCAcFdy+jw0m4nLUmU0=; b=EzWr9NpkeMY1MighInJTWN0CJNwI/PL2N7UBIs8jGI8yVFnxB7p6zPwREGCoXFcCd2 9sTqAvYh5/PNkTseYn0vbhYqqVp4FcuiD01cv0/yM5YeMnwvsgANdVI3NciQ2qcHIgcZ qWGnw0hmZ620BuItf1nHBxcUdTqy/+kdrAR8Y+5OtuLC0dYM5PlgDRR8agIv74tDk6+3 0zqBa+S756+RhzpX5owKUXmsC2NT/R4q2tGz+4DnYmYROJkMsG3rEu2nkZOIOXR0gC2d oGqhwmjy1PIt47VIKPw7NwbVfVtqHRtKfbSIAqjVZxr2KxOU2c8b0Qb2ZSnwUAN2cBHa 1HGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lebDnOxcgbHY/ONBaRsvdirSXCAcFdy+jw0m4nLUmU0=; b=jcQyZtqZiICjKiyOvuKbLqEg5erp0h86lmWLLgNb8n6/5o+Q2S95S9c9092bSbsGrC 0xekLT8DNrtVxyUmfKen5a7DhasVFQeJfCcuPI7KEkMvCdLNogOgU39FG8nqBIluUAi3 VRZIoy+QWqTBzeW9AFpc4jhRIhw5D0S0HcFq0Wz0ttcsIUGEsKpuMZSdz5yCTN3AIlCK lNm4EwG+xWpF0ejxry8L0EMichj35BzJTa595v608biSF+3oJaevkvZl9rXw4DEqfKZ7 fV3PL2AO4jw3WM8xmTLDXKK0RbMYcTNX2M5mUP4Uj7BtxKq3VwPRCRW/h8d/pD0zf3eR wP+Q== X-Gm-Message-State: AOAM5303brwM+4g5dEqZ9MiCtGL2wgBdorXi0LsFKcKuFJa6psz5X6aI yeLv1ip7cHkCkgCj0rG9XS0= X-Google-Smtp-Source: ABdhPJxRiAHozM72IY04xNg0EqY2n4hxU1jX/JKHU/Fyc9NOsocfaCoRkRKHyVic9FjHpmwOmGSbOQ== X-Received: by 2002:a19:c506:: with SMTP id w6mr3724310lfe.656.1625228517473; Fri, 02 Jul 2021 05:21:57 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id p15sm257754lfr.293.2021.07.02.05.21.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 05:21:56 -0700 (PDT) References: <87r1hmdqek.fsf__16088.3597027109$1622530682$gmane$org@gnus.org> <835yxtlw14.fsf__2546.8955327355$1625164803$gmane$org@gnu.org> From: Maxim Nikulin Message-ID: <1ddf1c46-0a28-4a2d-cc40-094ff74ee0ac@gmail.com> Date: Fri, 2 Jul 2021 19:21:55 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <835yxtlw14.fsf__2546.8955327355$1625164803$gmane$org@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lars Ingebrigtsen Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625228657; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lebDnOxcgbHY/ONBaRsvdirSXCAcFdy+jw0m4nLUmU0=; b=CPJNZjy/YHQC5ao5Cosb9r1fmrPcD38rmrpV19Yq8BV0GG/aMwbBZ6B19aTiBXcmZgnG/d 5Q+3L6Pws+3yl5uvRDg9DEbRYhEnB8bnbFJ0eyE6HrDceGe3YVg4OaiMD5TNBVj5R44Np5 /Ur8LErTwZLfGan4eRqzblteIrjF293MYnjUMwaJP4v4PewhRn9zHBKxFyxtb1ZHqy5GXY CggiCLKQpGJ0fmtOX/OwI1H96DjG2X+ebEk+bjDrhBZr/PQS/DIM0N5zueyQ6Gkqkma/yi t88L809Anw6zFMX4L0KvCkmZfaUEnbP9MBKOEd2FPU66uqngwmMeD8BbMb3Qag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625228657; a=rsa-sha256; cv=none; b=X+xj6elYwgAjAnfRY2X/2mn/WSYaLBqxJ48zIm7JqpfgqeZkh5JLAxZh/QwAmCVgpqScmZ jlxnaIGCb8TtZh1QjfJmaL89QLUgYvOOUWXxD+ox8ofMKbHgJ3IajAJobE6lsSRUbR5rbJ mHhFjH/hUgPLTDNnoqH+ylKY5Z4WRS4mRjVwgW6Y9ikxcbr32pz1XOGNCxtGQyJmHRbXMj nbe7Bz7HaIiXkg74A3zp2qG89SeyM81Y9noxzR9MKzCKbTJvbZXS6NmrJFHgP+vpb+Yo8X vebdpMY3ffGqeZH2azUvLH9mxD06lTnUt1mahYbqyRaPFZukkKgtB/DA0odxlQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=EzWr9Npk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=EzWr9Npk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 052B620D27 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: VRXgAAnbqLBs On 02/07/2021 01:38, Eli Zaretskii wrote: >> From: Maxim Nikulin Date: Fri, 2 Jul 2021 00:01:59 +0700 >> >> --- a/lisp/net/mailcap.el >> +++ b/lisp/net/mailcap.el >> - (start-process-shell-command command nil command))) ... >> + (make-process >> + :name "mailcap-view-file" :connection-type 'pipe :noquery t >> + :buffer nil ; "*Messages*" may be suitable for debugging >> + :sentinel (lambda (proc event) >> + (when (and (memq (process-status proc) '(exit signal)) >> + (/= (process-exit-status proc) 0)) >> + (message >> + "Command %s: %s." >> + (mapconcat #'identity (process-command proc) " ") >> + (substring event 0 -1)))) >> + :command (list shell-file-name shell-command-switch command)))) > > First, you replace start-process-shell-command with make-process, and > I'm not sure I understand why. If all you want is to use pipes, why > not simply bind process-connection-type around the call to > start-process-shell-command? >> + ;; An alternative is `process-connection-type' let-bound to nil for >> + ;; `start-process-shell-command' call (with no chance to report failure). -----------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> If main process of the handler fails then show a message with exit >> reason. ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > And with other handlers, this could be an > incompatible behavior change if the handler behaves differently when > its standard handles are connected to a pipe rather than a terminal > device. Example of such handler, please.