[HN Gopher] Emacs: Quickly Killing Processes
___________________________________________________________________
Emacs: Quickly Killing Processes
Author : xenodium
Score : 41 points
Date : 2022-11-13 01:16 UTC (21 hours ago)
(HTM) web link (xenodium.com)
(TXT) w3m dump (xenodium.com)
| SoftTalker wrote:
| Doesn't work if emacs itself is blocked waiting on the process.
|
| I just tab over to a terminal and use pgrep/pkill for this.
| gpderetta wrote:
| I use aggressive-indent-mode with lsp and often clangd gives an
| error about "something something non added document" and emacs
| hangs. The only way to unblock it is to kill clangd from a
| shell.
|
| Quite annoying, but haven't spent much time debugging it
| omnicognate wrote:
| Whether that matters depends on your use. Usually when I want
| to kill a process it's a program I'm working on and unrelated
| to emacs itself. This will be very useful for that and I can
| still always fire up an external terminal to kill things in the
| rare case where emacs itself is stuck waiting foe something and
| I can't C-g it. (Actually, since I use emacs EXWM as the window
| manager, in that situation I would Ctrl-Alt-Fkey to another tty
| and kill emacs if SIGUSR2 doesn't wake it up - a very rare
| situation indeed.)
| flylikeabanana wrote:
| If you're on linux, rofi[1] is a very versatile fuzzy-search
| graphical application. One of the typical ways to use it is to
| invoke it in script mode (see man rofi-script) with a shell
| script, where if called without arguments it invokes rofi against
| that script's stdout, and if called with arguments it runs a
| different command with that argument. This is nice because I
| don't have to switch to/open a new terminal or emacs, it's bound
| to a key I can invoke from anywhere in the graphical session. The
| kill process script is pretty simple (I filter out the path names
| from the nix store since I'm using nix) if [[ -z
| "$@" ]]; then echo -e "\0prompt\x1fKill Process"
| ps -ax | awk '{$2 = "" ; $3 = ""; $4 = ""; print $0}' | tail -n
| +2 | sed 's/\/nix\/store\/[^\/]*//' else kill $1
| fi
|
| [1] https://github.com/davatorium/rofi
| tmtvl wrote:
| Rofi didn't work very well for me on Wayland, but there is a
| wlroots counterpart imaginatively named Wofi:
| https://cloudninja.pw/docs/wofi.html
| flylikeabanana wrote:
| There's a patched fork of rofi that supports wayland that I'm
| actually using, but linked the upstream in my OP for general
| reference: https://github.com/lbonn/rofi#wayland-support
___________________________________________________________________
(page generated 2022-11-13 23:01 UTC)