From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GF1LF+JtkGLkBgAAbAwnHQ (envelope-from ) for ; Fri, 27 May 2022 08:21:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4A4iF+JtkGLr5AAAauVa8A (envelope-from ) for ; Fri, 27 May 2022 08:21:22 +0200 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 10662D843 for ; Fri, 27 May 2022 08:21:22 +0200 (CEST) Received: from localhost ([::1]:46708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuTLc-0000Lg-QA for larch@yhetil.org; Fri, 27 May 2022 02:21:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuTJy-0000LU-Us for emacs-orgmode@gnu.org; Fri, 27 May 2022 02:19:39 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:38718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuTJx-000696-2O for emacs-orgmode@gnu.org; Fri, 27 May 2022 02:19:38 -0400 Received: by mail-pl1-x632.google.com with SMTP id n18so3327894plg.5 for ; Thu, 26 May 2022 23:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=Z4yzmXJV4iYe+a4OXlACh9Xt5IGMNBUO5qUEMKhBXGs=; b=FwUjZ5L4iqt4t3cXmhUENHYWs0gjuvCy/SFji+w392rnMYwtPH1NP6otim2pNGrFB6 mkvfcPFzGHTbJCs+UF2ApE4P8fJgzZjTqyKHJPiEX/Nl1FGIQ4L9GPtoMp0+BheeIixG 4sX/IJzU+VOw9j0xIVGYztrx8hPTz16D5ssLGDp4hm/sHkn3g8M/4bPA0o31e2+LHcaK 4l/hbCAtYeOPPyOw1D/wsxY7bSZmpVucD4BX6iC1wTdPSpEXfWt65zqFmmCSVal3CNyZ A4RA3+HM+zgfHaUyjUb8ypqrH9zjRYLy79RGYd0KcNoCt1OwPbODgaArjANLlHeMfraw OQ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=Z4yzmXJV4iYe+a4OXlACh9Xt5IGMNBUO5qUEMKhBXGs=; b=ouKmn1HQzXEGhPWeKJrtpUrBMRS+0qNSGDOrBy/S6NLJZBP1ACknm6h0J7s2ku2ZUo L1mAwPnjkip8QrUZ+BCZ2YmtBrhCtPfpw/Yy4plPb3gx+GtEywKVAuIlUF2KI5OfB/pT KNbzymo2NyIJC/8Wy/mvH00aNxUJML8i2BaYlywD4AvRZl+Vkds1/57bXvULOfET5S3j J0RWFxZu0TmZjn3LGp+SQYLAjLipoyZQJrqoGbyn+lgIpUNtEiTYKKuBbru9tbmt6OMt PctooBSAN3GRJ9W9tKTtm8l/VMe3S3G+qwgfgFj2w5yQnZq8K1N3Xkvs7hEZ4GIwhnuj WXig== X-Gm-Message-State: AOAM531vNsIDRAK2PlmmnW3cyHp0KVYnOecp22W3/NVEayyRlGVcXLyP TUipLKX1BrjdmRXNPK4Gceo= X-Google-Smtp-Source: ABdhPJyCeJhU/AR5MnVemGOfyR6wsnd+9wmfQkEEf8mm+eUjm1DaE4Y7UXOUzY7W29Vhwct+7VNhjw== X-Received: by 2002:a17:90a:7847:b0:1df:a16d:2bfb with SMTP id y7-20020a17090a784700b001dfa16d2bfbmr6702830pjl.71.1653632367166; Thu, 26 May 2022 23:19:27 -0700 (PDT) Received: from localhost ([104.223.86.8]) by smtp.gmail.com with ESMTPSA id 2-20020a630602000000b003c14af5061asm2628462pgg.50.2022.05.26.23.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 23:19:26 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-open-file immediately termininates when calling xdg-open that calls emacsclient In-Reply-To: References: <87ee0mp4hb.fsf@localhost> <87bkvke5iq.fsf@localhost> Date: Fri, 27 May 2022 14:19:39 +0800 Message-ID: <87czfzwl8k.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=yantar92@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653632482; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Z4yzmXJV4iYe+a4OXlACh9Xt5IGMNBUO5qUEMKhBXGs=; b=NNZgj8WpNnhFtanXvXIe1CD0cgZjBaqQCt1ZobzzVPxPBuOCa3KCBkU59FAdRdvI8qrhfn Ayn2edngd+iFnHVNCtk3rujswaZxGiy6g522svPinlPAgAW35IaVUvyWRpZCS351TvG7wY VDMj4cXWhNW5EfhBayvZddgxP5mUNjXfdbduhkHxjM/9lPvJLE6Y8CtmgcJWH8kHLeF7fB 5gHyul8seHvXS1pQJXx4ZhVIqq1msBxCBgATLTCEHWpiIdPFkSpUkzJrUchEGYbrpZB/eT yxyKuzNmayNeW3jfLIvV2OMyafw+UxPa0GZ/e3b3/lm9iorpSxhZybJpXDJ2Gg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653632482; a=rsa-sha256; cv=none; b=TgRjzwSVAChDps9t1+wM7g0Ll8xGqYalbMzRoXqtdXbDkhK0t6+WTOS9VjTwEMpt70YvrW 7ONGL5ZQ7In2O3mvAKa3ykLAUMo2wGjzPCFWoH68fTWiwuUFCshSgbf+iW6DYdqJlF+f6j 1uV+qk2KvI3o17GsOrS0WbWtf/3UQHvmZM3ZB9EQkS6YCjdoT9QGnMWQsjTcBhnAqXgEla 2veLxJHLNG1GHK9tQg38NhRAWs2QvgtLW631G8+sKgTXr4z2krqDIE/wd/Vj6U8bPzpPFD ML9xylzLJTCcr1miMq6qwnvJ9qA/64gq7b4+KneVYT/tdv3NKajSQzMlu9qFBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FwUjZ5L4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FwUjZ5L4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 10662D843 X-Spam-Score: -5.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: k0gKShOhypIj Max Nikulin writes: > On 26/05/2022 21:24, Ihor Radchenko wrote: >> Max Nikulin writes: >> >> Try the following: >> >> (start-process-shell-command "1" nil "emacsclient -c ~/.bashrc") >> (let ((process-connection-type nil)) >> (start-process-shell-command "1" nil "emacsclient -c ~/.bashrc")) >> >> The second command will cause flickering, though opens the file in the >> same frame (not the new as one would expect from -c switch). > > Both commands creates a new frame in Emacs-26 and Emacs-27. I have not > tried 28 yet. Thanks for testing! It appears that the problem was triggered by my config in some very unexpected way. I managed to narrow down the reproducer with the following minimal configuration: ~/.emacs.d/init.el ----------------------- (require 'server) (unless (server-running-p) (server-start)) (setenv "DISPLAY" ":0.0") (define-key input-decode-map (kbd "C-[") [C-\[]) ------------------------------ With this exact init.el, trying to run (let ((process-connection-type nil)) (start-process-shell-command "1" nil "xdg-open ~/.bashrc")) triggers flickering/Emacs crash. I am pretty sure that it is some kind of weird Emacs bug. Best, Ihor