From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: not good proposal: "C-z " reserved for users Date: Tue, 16 Feb 2021 10:13:18 +0300 Message-ID: References: <877dna6kag.fsf@robertthorpeconsulting.com> <87ft1xurht.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19122"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 16 08:18:36 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1lBud2-0004rV-HU for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 08:18:36 +0100 Original-Received: from localhost ([::1]:41160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBud1-00072K-IO for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 16 Feb 2021 02:18:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBucP-0006yh-7H for help-gnu-emacs@gnu.org; Tue, 16 Feb 2021 02:17:57 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:57155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBucM-0005KZ-Uq for help-gnu-emacs@gnu.org; Tue, 16 Feb 2021 02:17:56 -0500 Original-Received: from localhost ([::ffff:197.157.34.167]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000011F80.00000000602B71A0.00000CB2; Tue, 16 Feb 2021 00:17:51 -0700 Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87ft1xurht.fsf@zoho.eu> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128111 Archived-At: * Emanuel Berg via Users list for the GNU Emacs text editor [2021-02-15 21:19]: > Robert Thorpe wrote: > > > Emmanuel, I agree with Jean Louis about this. A tool that > > can't stop and restart jobs does not provide all the > > facilities of shell job control. Tmux and GNU Screen are not > > full replacements for job control. > > Roobert, first, what's the definition of a job? Is it > a process or what it is, technically speaking? Read the Job Control Basics in Bash manual. I do not see that GNU Screen and Tmux are any replacement for job control. They just give to user possibility to run multiple shells or other programs in the same time so that programs do not get interrupted if user does something else. That is not related to job control. It does not relate to suspending a job, as terminal multiplexers do not suspend or stop the job temporarily, they run the processes. Inside of them one can use job control, but that is not feature of those programs screen and tmux, it is feature of shell. > Second, what is it you want to do with it, that cannot be done > from the shell, but it _can_ be done with "shell job control"? > > > Having a job in another tab is not the same as stopping it. > > I guess not :) That is what you can do with job control. You can stop the shell. And regardless in which environment one is, like within screen or tmux, console, terminal, even Emacs, one can suspend process in shell. Screen or tmux are not about suspending a process or stopping a process. I have asked if that exists, I do not know for tmux, but in screen there is no such thing. Just read the Bash manual on job control. > kill, top, nice and renice deal with processes and they can be > - what am I saying - they ARE - used from the shell. So just > fire up a new pane in tmux and use them all you want, happens > every day. Today by emergency I have used Control-Z, but let me remember why. I think I was searching which program could be doing some nasty staff, was it Emacs or other program. Yesterday me and you we were playing with this and I have put emacs as my login shell. Then I found there are multiple invokations of Emacs, I could not believe it. Something like "emacs -c zgrep --version | head -1" was invoked so many times, and I did not know what is happening. Emacs frames were appearing one after the other. During that work, I was greping in Emacs sources and trying to find a solution, so I could suspend grep in background with Control-Z inside of shell (not inside of Emacs, as X interface was not usable any more) and I could grep maybe other sources or do $ git log, as I was thinking it could be possible Emacs bug or something, so I was first greping, then thinking let me review git log. Processes have been spawned several every second. In 2-3 seconds I would get 40 emacs processes. X became unusable, I had to switch to console. It looked like denial of service attack. All what it did is that some program, some process tried to invoke the login shell and my login shell was "emacs" and login shell wanted to get version number of zgrep. Instead of shell, emacs was spawned that does not have option "-c". When system is under load there is no time to spawn tmux or screen. It is emergency, I went to console, there is panic level, I was greping and awking processes and killing bunch of them which have "zgrep" and "emacs" in command line in order to be able to find some references what is doing it. kill, top, nice, etc, they are all good and fine especially when you have time and you need not urgently stop a process. When process is already running in the shell, you have Control-Z. Imagine you log by SSH into remote server and you start maintaining a database, process may take a lot of resources and you do not know what is happening. User cannot predict that something like that is to happen to first invoke screen or tmux to be able to switch easier from one terminal to other. In your considerations you also assume that every user has installation rights, but that is not so, there are much more shell users who do not have installation rights. To have screen/tmux they would need to ask their administrator to install it, but Control-Z works instantly. Just because you as user use Emacs personally and individually without other users on your computer, does not mean that Emacs is for single user computers. Neither Emacs nor other GNU/Linux and UNIX-like software. It is meant for multi user computers. My family use multi user computers. Each family member have their user space. They can use software that is installed, but cannot install themselves, at least not globally. Local installations are possible, but is difficult. Universities and various institutions do not give root rights to every user. They may not have screen/tmux.