From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43509-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 0206afbc for ; Thu, 20 Sep 2018 23:10:20 +0000 (UTC) Received: (qmail 12686 invoked by alias); 20 Sep 2018 23:10:10 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43509 Received: (qmail 24641 invoked by uid 1010); 20 Sep 2018 23:10:09 -0000 X-Qmail-Scanner-Diagnostics: from joooj.vinc17.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(155.133.131.76):SA:0(-1.9/5.0):. Processed in 3.458011 secs); 20 Sep 2018 23:10:09 -0000 X-Envelope-From: vincent@vinc17.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Date: Fri, 21 Sep 2018 01:10:00 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Cc: Joey Pabalinas Subject: Re: long-standing tty related issue: wrapped Emacs not suspended Message-ID: <20180920231000.GA16205@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org, Joey Pabalinas References: <20180920123005.GA20647@zira.vinc17.org> <20180920154342.vzuloutkfk57tpqv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180920154342.vzuloutkfk57tpqv@gmail.com> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.10.1+96 (4350694b) vl-108074 (2018-09-18) On 2018-09-20 05:43:42 -1000, Joey Pabalinas wrote: > I don't actually know if you can resume emacs in that state, but anyway the > simpler workaround is to use something like `f() { emacs -nw "$@" & }; f` > where having the & inside the function itself avoids the extra subshell and > gives you expected behavior. Well, this is not a workaround in my case, since I do not necessarily want the "-nw" and the "&" (that was just for testing). But thanks to your explanations, I could find a workaround: 1. Instead of using a shell function, use a script. 2. And in the script, replacing emacs "$@" by exec emacs "$@" seems to avoid the problem, because the subshell is replaced by emacs (I can do this because emacs is the last command). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)