From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: not good proposal: "C-z " reserved for users Date: Mon, 15 Feb 2021 00:13:53 +0200 Message-ID: <8f760064-b6c2-5714-8a0c-6645b398e0fc@yandex.ru> References: <871rdk4c1m.fsf@robertthorpeconsulting.com> <640551af-d035-f133-3b98-fe7c7a06279d@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38716"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: Robert Thorpe , gregory@heytings.org, help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 14 23:14:38 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 1lBPf2-0009x0-P6 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 23:14:36 +0100 Original-Received: from localhost ([::1]:38144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBPf1-0000At-Po for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 17:14:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBPeS-0000AZ-CR for help-gnu-emacs@gnu.org; Sun, 14 Feb 2021 17:14:00 -0500 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBPeP-0004qI-W2 for help-gnu-emacs@gnu.org; Sun, 14 Feb 2021 17:14:00 -0500 Original-Received: by mail-wr1-x430.google.com with SMTP id n8so6752333wrm.10 for ; Sun, 14 Feb 2021 14:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cXBUM1LzsSEVAPhfRAvvxL7v99lwmu/42fEeecrsh2A=; b=m6Ji+TJ7fVL/FKZ5es/3yPEX+JMSh2PMX84yQTxngor+z9Wa3xeWaEC/OlOZgdM1zb Xc+KSQvYdWm9EsU+gIxqRlWBSru/YzV2sqYWRBgQ2ojb1xBg/AYlUJAIv7Bp3vKa3SaD PGa895yqMEZbPjGe9Z0yge/xAYUTZDVRhxIK3tmCbyXg8uD1uGOD5uK4jDXxqbLlsk0X PpgB1XJ73AbZLYP/M8/E2cqtx21nPWWYOrHZwcVIeHql3B1Ubhet7hz4T75/34Zln8mp eEyg6LdKvTy9aUtgzTF7IqxAl3+vzxFVHQ0e8SUMZdK2iWYhPfaR2rwyi5zDICwWuW3R vvMQ== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cXBUM1LzsSEVAPhfRAvvxL7v99lwmu/42fEeecrsh2A=; b=VzD0WNeaormHXgzxeXsUVpjd6aVuNK+Rn9jqwsAUCaNxaEcSibor9LYqCSwkRr6IUa LSXJ57G/EEwQu8vECIEKnTOLnHPawGMxyjiCkCxdTrtFC/qez2Tj0C8opEDgLl+hOHc/ C+DcnjzBnE1xHs2Gm8A3IeYA4tVm9gmyD0OPA55M2ZPlA0yd104p5NKBakht/zFG1wXr uF8zz8D2r1QS6xg3/bB/ABl3+rtQ7XF4mPk6N/H5UdegIcMwAsbF55hjAUcUxur/xJvc o75HZZhJ3A74TNlUizF5GMHoZ5VnujdFMurf2CyVl5lOfklvBAt5KQBh7wt2SrfAJipU Sj7A== X-Gm-Message-State: AOAM5320ew7K4hvSyBAAva8rpLVTj5BSWNlkbKHSeM6UZIZvp0pXIB1a /U6eH6lbxMHdiRj1v4SNbyo5VXtHen0= X-Google-Smtp-Source: ABdhPJxIhbX6DV8u7cyhwwbpzKPw5INQQgqb7pOyXxfTZWTb9pio1JmRylI9TJ+W6dZQfyG2MZ4RtQ== X-Received: by 2002:adf:dd85:: with SMTP id x5mr6425401wrl.230.1613340836098; Sun, 14 Feb 2021 14:13:56 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id a17sm26508115wrx.63.2021.02.14.14.13.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Feb 2021 14:13:55 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=raaahh@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:128062 Archived-At: On 14.02.2021 09:58, Jean Louis wrote: >> It's not a 100% conclusion of the survey we have referred to previously, >> but its results state that ~30% of all users are in the terminal, ~30% of >> all users are using a Vim key bindings emulation, and ~30% of all users have >> been using Vim as their primary editor previously. They can't be all the >> same users, but it's an interesting coincidence. > > If there are 200 million Ubuntu users, 13 million Emacs users by using > Popularity Contest survey data, then 30% of those would be few > millions of Emacs users using it in terminal. Not all Ubuntu users are software developers. Decent math otherwise. >> I do see people working in the terminal, but that's either someone using Vim >> (which has no popular graphical UI still), or running tests, or doing some >> exploration in a REPL. Some edit code inside Docker, though. > > I am not working with anybody in the team and still see so many > reasons of using terminal and editor inside of terminal. How many > self-hosted software is today offered and available, it is more than > ever. People who need to install such software mostly need to use > terminal. I'm not talking about the terminal in general and its usefulness, or about what people *can* do with it. Only about what they actually do with regards to the feature in question. Because even though "suspend job" is handy to have in the toolset, if an average user only reaches for it twice a year, that command doesn't really need a key binding as prominent as 'C-z'. In comparison, I hit 'undo' at least a dozen times per hour. >> But I rarely ever see someone using the 'C-z' -> 'fg' pair, in fact, I >> struggle to remember anyone do that (except some of the sysadmins, I >> guess). > > If you have not get clear picture of number of terminal users you > cannot possibly know somebody is using job control in their shells. You can do that by watching people work. And I do have a clear picture of the number of terminal users. > If you have not invoke programs that process large data sets it is > harder to understand. 220005 people need to be updated for their > number of interactions (their emails, SMS, calls, notes, tasks) and > that process involves harvesting their emails, counting it, > harvesting the database and counting. I wish it would be fast but it > is not. The process will take usually 2 days. I do it maybe once per > quarter. It blocks the system and computer has to be used. Suspending > a job is easier, then unsuspending it when I am not personally on > computer. Interesting. That sounds like the case closer to "non-multitasking" systems I was talking about. Here, I can launch a resource-intensive process or two, and still use the computer myself. > Sending emails to thousands of people may also need to be suspended > and unsuspended. People do that mostly on remote servers, that is why > those servers are dedicated. But I do not keep the database on the > remote server for safety, so I am sending it from office computer. > > Depending of the mail queue involved and environmental circumstances, > things can go wrong. Power can be off due to outage in East Africa > where I am circumstantially located. Network provider may cencor some > of the IP addresses or there can be political voting during which > period Internet may completely censored depending of the nature of > specific dictator. Without knowing WHEN is Internet going to be > unsuspended one may need to suspend current jobs. If programming is > good, interrupting job could be better solution, but sometimes > suspending is better one. You might also want to look into giving that process a lower priority, so that it gives way to your interactive tasks when you're logged in. > Video processing may need days, weeks to finish. I have programmed it > by Emacs Lisp that invokes `ffmpeg' in such a way to process file by > file. Such instance of Emacs may run separately in console, or > terminal. I can then change my graphics environment without having > process interrupted in console. I can suspend the process in terminal > and have it waiting on separate workspace until I unsuspend it during > the night time or my absence from the office. > > (defun video2webm-dired () > "Converts any video to webm" > (interactive) > (let* ((bitrate (read-number "Bitrate: " 300)) > (videos (dired-get-marked-files)) > (videos (mapcar 'video-mime-type-p videos)) > (videos (seq-remove 'null videos)) > (async-shell-command-buffer 'new-buffer) > (command (format "ffmpeg -y -i `?` -c:v libvpx-vp9 -b:v %sk -pass 1 -passlogfile `?` -speed 4 -c:a libopus -f webm /dev/null -async 1 -vsync passthrough && ffmpeg -y -i `?` -c:v libvpx-vp9 -b:v %sk -pass 2 -passlogfile `?` -speed 1 -c:a libopus \`?`.webm -async 1 -vsync passthrough && rm `?`-0.log;" bitrate bitrate))) > (dired-do-async-shell-command command nil videos))) > > I could as well use Common Lisp or other programming language, again I > would need suspend option as processing videos from mp4 to webm for > websites takes days or weeks depending of size of videos. Other people > delegate that job to YouTube, I don't and do processing on my > computer. That's neat. But if you only do that once or twice per month, perhaps the 'C-x C-z' binding could suffice? >> I am aware of that capability myself, but never take advantage of it, opting >> instead for an additional split in the terminal emulator. Overall, it seems >> to be like it had been more important in the earlier age when operating >> systems had no real multitasking. Now we have terminal splits, and tmux, and >> so on. > > Suspending a job is not same as concurrently running multiple > jobs. It requires more understanding. Right. But I was assuming that people reach similar goals with those two techniques. Perhaps not. >> If it actually matters to the decision makers, I could make a poll or two >> (maybe on Reddit, maybe on my workplace) about whether people know about >> this feature, and whether they use it regularly. > > I do believe firmly that not many users use it. But that is case for > the Bash and general computing. Emacs is on top of the Bash, Bash is > fundamental to Emacs and job control is more fundamental to Emacs. Is it? I mean, Emacs itself has shell, eshell, and other features that sometimes duplicate Bash's functionality. > If you are making a poll, then make a poll among people who know what > is job control. You can choose any community for your polls, but that > will not make your survey authentic. If I ask chicks behind my house > they will say pee, pee, but I am sure they will answer negatively on > job control question, as they have never learned about Bash, and many > people who learned about Bash, Korn Shell, dash, zsh, did not learn > about job control. Ask those who KNOW about the job control if they > use it and when and how. That will be authentic information. I won't be making the poll without the maintainers' request. That would be just a waste of time. But if that happens, we should poll everybody. Because the question is not whether to remove the feature, but whether it should take up an important key sequence. And if people are using it very rarely, it shouldn't. > If I suspend a job in bash, I may decide to run it in background, but > not automatically. > > 1. Control-Z suspends the job, it stops running. > > 2. fg brings it in foreground > > 3. bg allows it to run in background, shell is free for other commands > in parallel > > 4. Invoking other jobs in meantime is possible without interrupting > the suspended job to be continual, they can be continued later with > fg or bg commands in shell > > 5. nohup, screen and tmux are not job control commands. They help you > run programs without your direct supervision and without > interrupting them when you log off. But is not related to job > control. > > See: (info "(bash) Job Control") This is Bash's manual. No Emacs's. > Additionally if you think that job control is useless, than start by > sending bug report to bash, dash, ksh and other shells, as that is > where job control is used, in the shell, Emacs being just one of > thousands of possible processes who respect the Control-Z. You could > as well make a proposal to change the POSIX standard. I don't think it is useless.