all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
@ 2024-07-09 13:04 the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-09 17:02 ` Jim Porter
  0 siblings, 1 reply; 11+ messages in thread
From: the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-09 13:04 UTC (permalink / raw)
  To: 72013

[-- Attachment #1: Type: text/plain, Size: 29065 bytes --]

If i write 'eshell/sudo kill <any argument> <any pid>' it just wont do anything.
It works only if i explicitly write 'eshell/kill' instead of just 'kill':

'eshell/sudo eshell/kill <any argument> <any pid>'

I don't understand this behavior, because there is only one
implementation of kill that is available on eshell anyway.

Reproduction:

1. emacs -Q
2. M-x eshell
3. (require 'em-tramp)
4. sleep 10000 &
5. eshell/sudo kill -STOP <pid of the process>

The process still will be in a sleep instead of being stopped.

6. eshell/sudo eshell/kill -STOP <pid of the process>

Now the process is stopped.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-04-23 built on archlinux
Repository revision: 326437e6c8a6497b1a38d002b1d28e74678a07aa
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12401000
System Description: Arch Linux

Configured using:
'configure --with-native-compilation=aot --with-tree-sitter --with-gif
--with-png --with-jpeg --with-rsvg --with-tiff --with-imagemagick
--with-x-toolkit=gtk3 --with-xwidgets
CPPFLAGS=-I/opt/homebrew/opt/jpeg/include
LDFLAGS=-L/opt/homebrew/opt/jpeg/lib'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM XWIDGETS GTK3 ZLIB

Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
windmove-mode: t
pyvenv-mode: t
shackle-mode: t
popper-echo-mode: t
popper-mode: t
eshell-syntax-highlighting-global-mode: t
all-the-icons-ivy-rich-mode: t
ivy-rich-mode: t
ivy-posframe-mode: t
counsel-mode: t
ivy-mode: t
override-global-mode: t
projectile-mode: t
global-treesit-auto-mode: t
global-fish-completion-mode: t
fish-completion-mode: t
corfu-popupinfo-mode: t
corfu-history-mode: t
corfu-echo-mode: t
global-corfu-mode: t
corfu-mode: t
yas-global-mode: t
yas-minor-mode: t
vimish-fold-global-mode: t
vimish-fold-mode: t
dired-async-mode: t
general-override-mode: t
global-evil-collection-unimpaired-mode: t
evil-collection-unimpaired-mode: t
evil-commentary-mode: t
global-evil-surround-mode: t
evil-surround-mode: t
evil-mode: t
evil-local-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-auto-revert-mode: t
pixel-scroll-precision-mode: t
save-place-mode: t
savehist-mode: t
electric-pair-mode: t
global-display-line-numbers-mode: t
display-line-numbers-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
tooltip-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
isearch-fold-quotes-mode: t
global-font-lock-mode: t
font-lock-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t

Load-path shadows:
/home/wurfkreuz/.emacs.d/straight/build/transient/transient hides /home/wurfkreuz/.source/emacs/lisp/transient
/home/wurfkreuz/.emacs.d/straight/build/bind-key/bind-key hides /home/wurfkreuz/.source/emacs/lisp/bind-key
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-lint hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-lint
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-jump hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-jump
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-ensure hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-ensure
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-diminish hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-diminish
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-delight hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-delight
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-core hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-core
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-bind-key hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-bind-key
/home/wurfkreuz/.emacs.d/straight/build/org/ox-publish hides /home/wurfkreuz/.source/emacs/lisp/org/ox-publish
/home/wurfkreuz/.emacs.d/straight/build/org/ox-org hides /home/wurfkreuz/.source/emacs/lisp/org/ox-org
/home/wurfkreuz/.emacs.d/straight/build/org/ox-odt hides /home/wurfkreuz/.source/emacs/lisp/org/ox-odt
/home/wurfkreuz/.emacs.d/straight/build/org/ox-md hides /home/wurfkreuz/.source/emacs/lisp/org/ox-md
/home/wurfkreuz/.emacs.d/straight/build/org/ox-man hides /home/wurfkreuz/.source/emacs/lisp/org/ox-man
/home/wurfkreuz/.emacs.d/straight/build/org/ox-latex hides /home/wurfkreuz/.source/emacs/lisp/org/ox-latex
/home/wurfkreuz/.emacs.d/straight/build/org/ox-koma-letter hides /home/wurfkreuz/.source/emacs/lisp/org/ox-koma-letter
/home/wurfkreuz/.emacs.d/straight/build/org/ox-icalendar hides /home/wurfkreuz/.source/emacs/lisp/org/ox-icalendar
/home/wurfkreuz/.emacs.d/straight/build/org/ox-html hides /home/wurfkreuz/.source/emacs/lisp/org/ox-html
/home/wurfkreuz/.emacs.d/straight/build/org/ox-beamer hides /home/wurfkreuz/.source/emacs/lisp/org/ox-beamer
/home/wurfkreuz/.emacs.d/straight/build/org/ox-ascii hides /home/wurfkreuz/.source/emacs/lisp/org/ox-ascii
/home/wurfkreuz/.emacs.d/straight/build/org/org hides /home/wurfkreuz/.source/emacs/lisp/org/org
/home/wurfkreuz/.emacs.d/straight/build/org/org-timer hides /home/wurfkreuz/.source/emacs/lisp/org/org-timer
/home/wurfkreuz/.emacs.d/straight/build/org/org-tempo hides /home/wurfkreuz/.source/emacs/lisp/org/org-tempo
/home/wurfkreuz/.emacs.d/straight/build/org/org-table hides /home/wurfkreuz/.source/emacs/lisp/org/org-table
/home/wurfkreuz/.emacs.d/straight/build/org/org-src hides /home/wurfkreuz/.source/emacs/lisp/org/org-src
/home/wurfkreuz/.emacs.d/straight/build/org/org-refile hides /home/wurfkreuz/.source/emacs/lisp/org/org-refile
/home/wurfkreuz/.emacs.d/straight/build/org/org-protocol hides /home/wurfkreuz/.source/emacs/lisp/org/org-protocol
/home/wurfkreuz/.emacs.d/straight/build/org/org-plot hides /home/wurfkreuz/.source/emacs/lisp/org/org-plot
/home/wurfkreuz/.emacs.d/straight/build/org/org-persist hides /home/wurfkreuz/.source/emacs/lisp/org/org-persist
/home/wurfkreuz/.emacs.d/straight/build/org/org-pcomplete hides /home/wurfkreuz/.source/emacs/lisp/org/org-pcomplete
/home/wurfkreuz/.emacs.d/straight/build/org/org-num hides /home/wurfkreuz/.source/emacs/lisp/org/org-num
/home/wurfkreuz/.emacs.d/straight/build/org/org-mouse hides /home/wurfkreuz/.source/emacs/lisp/org/org-mouse
/home/wurfkreuz/.emacs.d/straight/build/org/org-mobile hides /home/wurfkreuz/.source/emacs/lisp/org/org-mobile
/home/wurfkreuz/.emacs.d/straight/build/org/org-macs hides /home/wurfkreuz/.source/emacs/lisp/org/org-macs
/home/wurfkreuz/.emacs.d/straight/build/org/org-loaddefs hides /home/wurfkreuz/.source/emacs/lisp/org/org-loaddefs
/home/wurfkreuz/.emacs.d/straight/build/org/org-list hides /home/wurfkreuz/.source/emacs/lisp/org/org-list
/home/wurfkreuz/.emacs.d/straight/build/org/org-lint hides /home/wurfkreuz/.source/emacs/lisp/org/org-lint
/home/wurfkreuz/.emacs.d/straight/build/org/org-keys hides /home/wurfkreuz/.source/emacs/lisp/org/org-keys
/home/wurfkreuz/.emacs.d/straight/build/org/org-inlinetask hides /home/wurfkreuz/.source/emacs/lisp/org/org-inlinetask
/home/wurfkreuz/.emacs.d/straight/build/org/org-indent hides /home/wurfkreuz/.source/emacs/lisp/org/org-indent
/home/wurfkreuz/.emacs.d/straight/build/org/org-id hides /home/wurfkreuz/.source/emacs/lisp/org/org-id
/home/wurfkreuz/.emacs.d/straight/build/org/org-habit hides /home/wurfkreuz/.source/emacs/lisp/org/org-habit
/home/wurfkreuz/.emacs.d/straight/build/org/org-goto hides /home/wurfkreuz/.source/emacs/lisp/org/org-goto
/home/wurfkreuz/.emacs.d/straight/build/org/org-footnote hides /home/wurfkreuz/.source/emacs/lisp/org/org-footnote
/home/wurfkreuz/.emacs.d/straight/build/org/org-fold hides /home/wurfkreuz/.source/emacs/lisp/org/org-fold
/home/wurfkreuz/.emacs.d/straight/build/org/org-fold-core hides /home/wurfkreuz/.source/emacs/lisp/org/org-fold-core
/home/wurfkreuz/.emacs.d/straight/build/org/org-feed hides /home/wurfkreuz/.source/emacs/lisp/org/org-feed
/home/wurfkreuz/.emacs.d/straight/build/org/org-faces hides /home/wurfkreuz/.source/emacs/lisp/org/org-faces
/home/wurfkreuz/.emacs.d/straight/build/org/org-entities hides /home/wurfkreuz/.source/emacs/lisp/org/org-entities
/home/wurfkreuz/.emacs.d/straight/build/org/org-duration hides /home/wurfkreuz/.source/emacs/lisp/org/org-duration
/home/wurfkreuz/.emacs.d/straight/build/org/org-datetree hides /home/wurfkreuz/.source/emacs/lisp/org/org-datetree
/home/wurfkreuz/.emacs.d/straight/build/org/org-cycle hides /home/wurfkreuz/.source/emacs/lisp/org/org-cycle
/home/wurfkreuz/.emacs.d/straight/build/org/org-ctags hides /home/wurfkreuz/.source/emacs/lisp/org/org-ctags
/home/wurfkreuz/.emacs.d/straight/build/org/org-crypt hides /home/wurfkreuz/.source/emacs/lisp/org/org-crypt
/home/wurfkreuz/.emacs.d/straight/build/org/org-compat hides /home/wurfkreuz/.source/emacs/lisp/org/org-compat
/home/wurfkreuz/.emacs.d/straight/build/org/org-colview hides /home/wurfkreuz/.source/emacs/lisp/org/org-colview
/home/wurfkreuz/.emacs.d/straight/build/org/org-clock hides /home/wurfkreuz/.source/emacs/lisp/org/org-clock
/home/wurfkreuz/.emacs.d/straight/build/org/org-capture hides /home/wurfkreuz/.source/emacs/lisp/org/org-capture
/home/wurfkreuz/.emacs.d/straight/build/org/org-attach hides /home/wurfkreuz/.source/emacs/lisp/org/org-attach
/home/wurfkreuz/.emacs.d/straight/build/org/org-attach-git hides /home/wurfkreuz/.source/emacs/lisp/org/org-attach-git
/home/wurfkreuz/.emacs.d/straight/build/org/org-archive hides /home/wurfkreuz/.source/emacs/lisp/org/org-archive
/home/wurfkreuz/.emacs.d/straight/build/org/org-agenda hides /home/wurfkreuz/.source/emacs/lisp/org/org-agenda
/home/wurfkreuz/.emacs.d/straight/build/org/ol-w3m hides /home/wurfkreuz/.source/emacs/lisp/org/ol-w3m
/home/wurfkreuz/.emacs.d/straight/build/org/ol-rmail hides /home/wurfkreuz/.source/emacs/lisp/org/ol-rmail
/home/wurfkreuz/.emacs.d/straight/build/org/ol-mhe hides /home/wurfkreuz/.source/emacs/lisp/org/ol-mhe
/home/wurfkreuz/.emacs.d/straight/build/org/ol-man hides /home/wurfkreuz/.source/emacs/lisp/org/ol-man
/home/wurfkreuz/.emacs.d/straight/build/org/ol-irc hides /home/wurfkreuz/.source/emacs/lisp/org/ol-irc
/home/wurfkreuz/.emacs.d/straight/build/org/ol-info hides /home/wurfkreuz/.source/emacs/lisp/org/ol-info
/home/wurfkreuz/.emacs.d/straight/build/org/ol-gnus hides /home/wurfkreuz/.source/emacs/lisp/org/ol-gnus
/home/wurfkreuz/.emacs.d/straight/build/org/ol-eww hides /home/wurfkreuz/.source/emacs/lisp/org/ol-eww
/home/wurfkreuz/.emacs.d/straight/build/org/ol-eshell hides /home/wurfkreuz/.source/emacs/lisp/org/ol-eshell
/home/wurfkreuz/.emacs.d/straight/build/org/ol-doi hides /home/wurfkreuz/.source/emacs/lisp/org/ol-doi
/home/wurfkreuz/.emacs.d/straight/build/org/ol-docview hides /home/wurfkreuz/.source/emacs/lisp/org/ol-docview
/home/wurfkreuz/.emacs.d/straight/build/org/ol-bibtex hides /home/wurfkreuz/.source/emacs/lisp/org/ol-bibtex
/home/wurfkreuz/.emacs.d/straight/build/org/ol-bbdb hides /home/wurfkreuz/.source/emacs/lisp/org/ol-bbdb
/home/wurfkreuz/.emacs.d/straight/build/org/oc-natbib hides /home/wurfkreuz/.source/emacs/lisp/org/oc-natbib
/home/wurfkreuz/.emacs.d/straight/build/org/oc-csl hides /home/wurfkreuz/.source/emacs/lisp/org/oc-csl
/home/wurfkreuz/.emacs.d/straight/build/org/oc-bibtex hides /home/wurfkreuz/.source/emacs/lisp/org/oc-bibtex
/home/wurfkreuz/.emacs.d/straight/build/org/oc-biblatex hides /home/wurfkreuz/.source/emacs/lisp/org/oc-biblatex
/home/wurfkreuz/.emacs.d/straight/build/org/oc-basic hides /home/wurfkreuz/.source/emacs/lisp/org/oc-basic
/home/wurfkreuz/.emacs.d/straight/build/org/ob hides /home/wurfkreuz/.source/emacs/lisp/org/ob
/home/wurfkreuz/.emacs.d/straight/build/org/ob-tangle hides /home/wurfkreuz/.source/emacs/lisp/org/ob-tangle
/home/wurfkreuz/.emacs.d/straight/build/org/ob-table hides /home/wurfkreuz/.source/emacs/lisp/org/ob-table
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sqlite hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sqlite
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sql hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sql
/home/wurfkreuz/.emacs.d/straight/build/org/ob-shell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-shell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sed hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sed
/home/wurfkreuz/.emacs.d/straight/build/org/ob-screen hides /home/wurfkreuz/.source/emacs/lisp/org/ob-screen
/home/wurfkreuz/.emacs.d/straight/build/org/ob-scheme hides /home/wurfkreuz/.source/emacs/lisp/org/ob-scheme
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sass hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sass
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ruby hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ruby
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ref hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ref
/home/wurfkreuz/.emacs.d/straight/build/org/ob-python hides /home/wurfkreuz/.source/emacs/lisp/org/ob-python
/home/wurfkreuz/.emacs.d/straight/build/org/ob-processing hides /home/wurfkreuz/.source/emacs/lisp/org/ob-processing
/home/wurfkreuz/.emacs.d/straight/build/org/ob-plantuml hides /home/wurfkreuz/.source/emacs/lisp/org/ob-plantuml
/home/wurfkreuz/.emacs.d/straight/build/org/ob-perl hides /home/wurfkreuz/.source/emacs/lisp/org/ob-perl
/home/wurfkreuz/.emacs.d/straight/build/org/ob-org hides /home/wurfkreuz/.source/emacs/lisp/org/ob-org
/home/wurfkreuz/.emacs.d/straight/build/org/ob-octave hides /home/wurfkreuz/.source/emacs/lisp/org/ob-octave
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ocaml hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ocaml
/home/wurfkreuz/.emacs.d/straight/build/org/ob-maxima hides /home/wurfkreuz/.source/emacs/lisp/org/ob-maxima
/home/wurfkreuz/.emacs.d/straight/build/org/ob-matlab hides /home/wurfkreuz/.source/emacs/lisp/org/ob-matlab
/home/wurfkreuz/.emacs.d/straight/build/org/ob-makefile hides /home/wurfkreuz/.source/emacs/lisp/org/ob-makefile
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lua hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lua
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lob hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lob
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lisp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lisp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lilypond hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lilypond
/home/wurfkreuz/.emacs.d/straight/build/org/ob-latex hides /home/wurfkreuz/.source/emacs/lisp/org/ob-latex
/home/wurfkreuz/.emacs.d/straight/build/org/ob-julia hides /home/wurfkreuz/.source/emacs/lisp/org/ob-julia
/home/wurfkreuz/.emacs.d/straight/build/org/ob-js hides /home/wurfkreuz/.source/emacs/lisp/org/ob-js
/home/wurfkreuz/.emacs.d/straight/build/org/ob-java hides /home/wurfkreuz/.source/emacs/lisp/org/ob-java
/home/wurfkreuz/.emacs.d/straight/build/org/ob-haskell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-haskell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-groovy hides /home/wurfkreuz/.source/emacs/lisp/org/ob-groovy
/home/wurfkreuz/.emacs.d/straight/build/org/ob-gnuplot hides /home/wurfkreuz/.source/emacs/lisp/org/ob-gnuplot
/home/wurfkreuz/.emacs.d/straight/build/org/ob-fortran hides /home/wurfkreuz/.source/emacs/lisp/org/ob-fortran
/home/wurfkreuz/.emacs.d/straight/build/org/ob-forth hides /home/wurfkreuz/.source/emacs/lisp/org/ob-forth
/home/wurfkreuz/.emacs.d/straight/build/org/ob-exp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-exp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-eval hides /home/wurfkreuz/.source/emacs/lisp/org/ob-eval
/home/wurfkreuz/.emacs.d/straight/build/org/ob-eshell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-eshell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-emacs-lisp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-emacs-lisp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-dot hides /home/wurfkreuz/.source/emacs/lisp/org/ob-dot
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ditaa hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ditaa
/home/wurfkreuz/.emacs.d/straight/build/org/ob-css hides /home/wurfkreuz/.source/emacs/lisp/org/ob-css
/home/wurfkreuz/.emacs.d/straight/build/org/ob-core hides /home/wurfkreuz/.source/emacs/lisp/org/ob-core
/home/wurfkreuz/.emacs.d/straight/build/org/ob-comint hides /home/wurfkreuz/.source/emacs/lisp/org/ob-comint
/home/wurfkreuz/.emacs.d/straight/build/org/ob-clojure hides /home/wurfkreuz/.source/emacs/lisp/org/ob-clojure
/home/wurfkreuz/.emacs.d/straight/build/org/ob-calc hides /home/wurfkreuz/.source/emacs/lisp/org/ob-calc
/home/wurfkreuz/.emacs.d/straight/build/org/ob-awk hides /home/wurfkreuz/.source/emacs/lisp/org/ob-awk
/home/wurfkreuz/.emacs.d/straight/build/org/ob-R hides /home/wurfkreuz/.source/emacs/lisp/org/ob-R
/home/wurfkreuz/.emacs.d/straight/build/org/ob-C hides /home/wurfkreuz/.source/emacs/lisp/org/ob-C
/home/wurfkreuz/.emacs.d/straight/build/org/ol hides /home/wurfkreuz/.source/emacs/lisp/org/ol
/home/wurfkreuz/.emacs.d/straight/build/org/oc hides /home/wurfkreuz/.source/emacs/lisp/org/oc
/home/wurfkreuz/.emacs.d/straight/build/org/org-element hides /home/wurfkreuz/.source/emacs/lisp/org/org-element
/home/wurfkreuz/.emacs.d/straight/build/org/org-macro hides /home/wurfkreuz/.source/emacs/lisp/org/org-macro
/home/wurfkreuz/.emacs.d/straight/build/org/ox-texinfo hides /home/wurfkreuz/.source/emacs/lisp/org/ox-texinfo
/home/wurfkreuz/.emacs.d/straight/build/org/ox hides /home/wurfkreuz/.source/emacs/lisp/org/ox
/home/wurfkreuz/.emacs.d/straight/build/org/org-version hides /home/wurfkreuz/.source/emacs/lisp/org/org-version
/home/wurfkreuz/.emacs.d/straight/build/map/map hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/map
/home/wurfkreuz/.emacs.d/straight/build/compat/compat hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/compat
/home/wurfkreuz/.emacs.d/straight/build/seq/seq hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/seq
/home/wurfkreuz/.emacs.d/straight/build/eldoc/eldoc hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr emacsbug windmove lsp-modeline lsp-diagnostics
lsp-ui lsp-ui-doc xwidget bookmark goto-addr
evil-collection-lsp-ui-imenu lsp-ui-imenu lsp-ui-peek lsp-ui-sideline
lsp-ui-util face-remap bug-reference lsp-zig lsp-yang lsp-yaml lsp-xml
lsp-wgsl lsp-volar lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog
lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-trunk lsp-toml lsp-tilt
lsp-tex lsp-terraform lsp-svelte lsp-steep lsp-sqls lsp-sql lsp-sorbet
lsp-solidity lsp-solargraph lsp-semgrep lsp-rust lsp-ruff-lsp
lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn lsp-rf
lsp-remark lsp-racket lsp-r lsp-qml lsp-pylsp lsp-pyls lsp-pwsh
lsp-purescript lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad
lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-move lsp-mojo
lsp-mint lsp-meson lsp-mdx lsp-marksman lsp-markdown lsp-magik lsp-lua
lsp-lisp lsp-kotlin lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe
lsp-hack lsp-groovy lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elm lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher
lsp-cucumber lsp-css lsp-csharp lsp-crystal lsp-credo lsp-cobol
lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go lsp-completion
lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm
lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens lsp-actionscript
python cc-awk sql view crontab-mode js c-ts-common cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
flymake-shellcheck mule-util em-unix em-term em-script em-pred em-ls
em-hist em-glob em-extpipe em-basic em-banner image-file image-converter
org-indent toc-org toc-org-autoloads org-bullets org-bullets-autoloads
org-tempo tempo org-drill persist org-agenda org-drill-autoloads
persist-autoloads org-download org-attach org-download-autoloads
lsp-ui-autoloads lsp-pyright lsp-mode lsp-protocol tree-widget
network-stream markdown-mode ht ewoc lsp-pyright-autoloads
lsp-mode-autoloads eldoc-autoloads markdown-mode-autoloads ht-autoloads
ansible ansible-autoloads haskell-mode haskell-cabal haskell-utils
haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support flymake-proc dabbrev
haskell-customize haskell-mode-autoloads dockerfile-mode
dockerfile-mode-autoloads terraform-mode hcl-mode
terraform-mode-autoloads hcl-mode-autoloads lua-mode lua-mode-autoloads
go-mode find-file ffap etags fileloop go-mode-autoloads raku-mode
raku-repl raku-imenu raku-indent raku-font-lock raku-detect
raku-mode-autoloads flymake-shellcheck-autoloads flymake-hadolint
flymake flymake-hadolint-autoloads pyvenv evil-collection-eshell eshell
pyvenv-autoloads shackle shackle-autoloads popper-echo popper
popper-autoloads vertico-posframe vertico-multiform vertico
vertico-posframe-autoloads vertico-autoloads transpose-frame
transpose-frame-autoloads evil-terminal-cursor-changer
evil-terminal-cursor-changer-autoloads em-tramp
eshell-syntax-highlighting em-prompt em-alias
eshell-syntax-highlighting-autoloads hydra lv hydra-autoloads
lv-autoloads helpful cc-langs cc-vars cc-defs trace cl-print edebug
debug backtrace info-look help-fns radix-tree elisp-refs
helpful-autoloads elisp-refs-autoloads fzf fzf-autoloads systemd
conf-mode systemd-autoloads emacs-crontab-mode-autoloads with-editor
server with-editor-autoloads all-the-icons-ivy-rich ivy-rich
ivy-posframe posframe counsel swiper evil-collection-ivy ivy delsel
ivy-faces ivy-overlay colir all-the-icons-ivy-rich-autoloads
ivy-rich-autoloads ivy-posframe-autoloads posframe-autoloads
counsel-autoloads swiper-autoloads ivy-autoloads embark-autoloads
use-package-bind-key bind-key mentor url-scgi mentor-rpc mentor-files
mentor-data xml-rpc url-http url-auth url-gw nsm evil-collection-term
term disp-table ehelp mentor-autoloads url-scgi-autoloads
xml-rpc-autoloads projectile projectile-autoloads cider-autoloads cider
package url-handlers tramp-sh cider-debug cider-browse-ns cider-mode
cider-xref-backend cider-find cider-inspector cider-completion
cider-profile cider-eval cider-jar arc-mode archive-mode
cider-repl-history pulse cider-repl cider-resolve cider-test
cider-overlays cider-stacktrace cider-doc cider-browse-spec
cider-clojuredocs cider-eldoc cider-docstring cider-client cider-common
xref project cider-completion-context cider-connection cider-popup
sesman-browser nrepl-client cider-util color sesman nrepl-dict spinner
clojure-mode lisp-mnt align imenu parseedn parseclj-parser parseclj-lex
parseclj-alist sesman-autoloads spinner-autoloads parseedn-autoloads
map-autoloads parseclj-autoloads clojure-mode-autoloads zoxide-autoloads
crux crux-autoloads paredit paredit-autoloads sudo-edit
sudo-edit-autoloads clojure-ts-mode clojure-ts-mode-autoloads
treesit-auto treesit-auto-autoloads exec-path-from-shell
exec-path-from-shell-autoloads fish-completion em-cmpl em-dirs esh-mode
esh-var esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups esh-util fish-completion-autoloads cape cape-autoloads
corfu-popupinfo corfu-history corfu-echo corfu corfu-autoloads orderless
orderless-autoloads yasnippet yasnippet-autoloads vimish-fold f
vimish-fold-autoloads f-autoloads docker docker-context docker-volume
docker-network docker-image docker-container docker-faces docker-core
docker-compose docker-process docker-utils tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet tramp trampver tramp-integration
tramp-message tramp-compat shell tramp-loaddefs docker-group dash aio s
docker-autoloads tablist-autoloads s-autoloads dash-autoloads
aio-autoloads circe lui-irc-colors irc lcs lui-logging lui-format lui
tracking shorten flyspell ispell circe-compat circe-autoloads
xterm-color xterm-color-autoloads rg files-x vc rg-info-hack rg-menu
rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext
evil-collection-ibuffer ibuffer ibuffer-loaddefs grep compile cus-edit
pp cus-load rg-autoloads wgrep-autoloads transient compat
transient-autoloads compat-autoloads seq-autoloads dired-async dired-aux
async async-autoloads avy avy-autoloads general general-autoloads
all-the-icons-dired all-the-icons-dired-autoloads all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons all-the-icons-autoloads
use-package-ensure rose-pine-theme evil-collection-unimpaired
evil-collection-minibuffer evil-collection-org evil-collection-dired
evil-collection annalist evil-collection-autoloads annalist-autoloads
evil-org-agenda evil-org evil-org-autoloads evil-commentary
evil-commentary-integration evil-commentary-autoloads evil-surround
evil-surround-autoloads evil evil-integration evil-maps evil-commands
evil-digraphs pcase reveal evil-jumps evil-command-window evil-types
evil-search evil-ex evil-macros evil-repeat evil-states evil-core advice
evil-common rect evil-vars edmacro kmacro evil-autoloads
goto-chg-autoloads undo-tree diff queue undo-tree-autoloads
queue-autoloads finder-inf use-package-core diary-lib diary-loaddefs
midnight autorevert pixel-scroll cua-base saveplace desktop frameset
savehist comp comp-cstr warnings comp-run comp-common elec-pair
display-line-numbers vc-git diff-mode track-changes easy-mmode
vc-dispatcher oc-basic org-element org-persist org-id org-refile
org-element-ast inline avl-tree generator ol-eww eww xdg url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus
xml gnus-cloud nnimap nnmail browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util url-parse auth-source eieio eieio-core json map
byte-opt url-vars mail-source utf7 nnoo parse-time gnus-spec gnus-int
gnus-range message sendmail mailcap yank-media puny rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view filenotify jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src sh-script smie treesit executable ob-comint org-pcomplete
pcomplete comint ansi-osc ansi-color ring org-list org-footnote
org-faces org-entities time-date noutline outline icons ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol rx org-fold org-fold-core
org-keys oc org-loaddefs thingatpt find-func cal-menu calendar
cal-loaddefs org-version org-compat org-macs format-spec
use-package-autoloads info bind-key-autoloads straight-autoloads cl-seq
cl-extra help-mode straight subr-x cl-macs gv cl-loaddefs cl-lib
bytecomp byte-compile rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 2094317 645374) (symbols 48 107702 236) (strings 32 378561 52866)
(string-bytes 1 11179635) (vectors 16 148008) (vector-slots 8 3068998 180429)
(floats 8 2420 1910) (intervals 56 146692 1687) (buffers 992 65))

[-- Attachment #2: Type: text/html, Size: 39434 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-09 13:04 bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-09 17:02 ` Jim Porter
       [not found]   ` <FzIMSNqLEmByDFP6l93Tg2cAkopa20KM4W1sArsq0kPAfLqDZg5egeKf4wLaqxkGI5DCexUsNta70roOjORbqHIB4w4zZeB_kUgaN8her48=@proton.me>
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Porter @ 2024-07-09 17:02 UTC (permalink / raw)
  To: the_wurfkreuz, 72013

On 7/9/2024 6:04 AM, the_wurfkreuz via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> If i write 'eshell/sudo kill <any argument> <any pid>' it just wont do 
> anything.
> It works only if i explicitly write 'eshell/kill' instead of just 'kill':
> 
> 'eshell/sudo eshell/kill <any argument> <any pid>'
> 
> I don't understand this behavior, because there is only one
> implementation of kill that is available on eshell anyway.
> 
> Reproduction:
> 
> 1. emacs -Q
> 2. M-x eshell
> 3. (require 'em-tramp)
> 4. sleep 10000 &
> 5. eshell/sudo kill -STOP <pid of the process>

This works for me. Running "M-x list-processes" shows that the sleep 
process is indeed stopped. (I also traced both 'eshell/sudo' and 
'eshell/kill' and they're being called correctly.)

I'm testing on commit a952ca5461c590fe194a2f96622603d6ccaebb47, so maybe 
you need to update your Emacs build? The revision you're on appears to 
be from April.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
       [not found]   ` <FzIMSNqLEmByDFP6l93Tg2cAkopa20KM4W1sArsq0kPAfLqDZg5egeKf4wLaqxkGI5DCexUsNta70roOjORbqHIB4w4zZeB_kUgaN8her48=@proton.me>
@ 2024-07-10  0:08     ` Jim Porter
  2024-07-10  0:22       ` Jim Porter
  2024-07-10  7:33       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 11+ messages in thread
From: Jim Porter @ 2024-07-10  0:08 UTC (permalink / raw)
  To: the_wurfkreuz; +Cc: 72013

(Re-adding the bug tracker address. The tracker requires using Reply
All to keep messages going to the list.)

On Tue, Jul 9, 2024 at 11:38 AM the_wurfkreuz <the_wurfkreuz@proton.me> wrote:
> Sorry, i was exhausted when i was rechecking everything before submitting the bug report and made a slip up. In reality the problem is with processes owned by root. I was trying to send signal to a docker daemon.

Ah ha. This is really an issue that 'eshell/kill' can't kill "remote"
processes. What you *want* to happen is for Eshell to kill the process
with some PID over the Tramp "sudo" connection, which makes it a
"remote" process. That'll fail for a couple reasons: 1) Eshell just
passes the PID to 'signal-process', and that PID will be interpreted
according to your local host+user, 2) Tramp doesn't support
'signal-process' in the first place, as far as I know (but it does
support things like 'delete-process').

> Also, it looks like it doesn't work even when i write 'eshell/kill' instead of 'kill'. The main point is that i can use the 'kill' command only with posix sudo when it comes to processes owned by root. Using it with eshell/sudo doesn't work:

/usr/bin/sudo works here because it doesn't call eshell/kill, it calls
/usr/bin/kill. eshell/sudo would also work if you call /usr/bin/kill.
You could spell the full path like that, or use "*kill", which ignores
the Eshell built-in version.

Your scenario is actually the *less* dangerous one though: since a
Tramp sudo connection is still (usually) on localhost, the PIDs are
all the same; all that'll happen is that "kill" fails sometimes. But
if you were connected over SSH to a remote host and ran "kill" in
Eshell, it would be killing *local* processes. That's highly
unexpected and would probably cause serious problems! I think the best
way to fix this would simply be for 'eshell/kill' to fall back to
'/usr/bin/kill' any time the default-directory is remote. That way is
a lot safer.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-10  0:08     ` Jim Porter
@ 2024-07-10  0:22       ` Jim Porter
  2024-07-18 19:33         ` Jim Porter
  2024-07-10  7:33       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 11+ messages in thread
From: Jim Porter @ 2024-07-10  0:22 UTC (permalink / raw)
  To: the_wurfkreuz; +Cc: 72013


On 7/9/2024 5:08 PM, Jim Porter wrote:
> I think the best way to fix this would simply be for 'eshell/kill' to
> fall back to '/usr/bin/kill' any time the default-directory is
> remote. That way is a lot safer.
I've pushed a fix for this to the master branch as 342998511ad. 
(Skipping the Emacs 30 branch, since this broken behavior has been with 
us for a long time, and I think it can wait another release.) Could you 
try it out to see if things work better?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-10  0:08     ` Jim Porter
  2024-07-10  0:22       ` Jim Porter
@ 2024-07-10  7:33       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-14 22:14         ` Jim Porter
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-10  7:33 UTC (permalink / raw)
  To: Jim Porter; +Cc: 72013, the_wurfkreuz

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> Tramp doesn't support 'signal-process' in the first place, as far as I
> know (but it does support things like 'delete-process').

Tramp ought to support signal-process (and interrupt-process). See
optional argument REMOTE of signal-process.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-10  7:33       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-14 22:14         ` Jim Porter
  2024-07-14 22:17           ` Jim Porter
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Porter @ 2024-07-14 22:14 UTC (permalink / raw)
  To: Michael Albinus; +Cc: the_wurfkreuz, 72013

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On 7/10/2024 12:33 AM, Michael Albinus via Bug reports for GNU Emacs, 
the Swiss army knife of text editors wrote:
> Tramp ought to support signal-process (and interrupt-process). See
> optional argument REMOTE of signal-process.
> 
> Best regards, Michael.

Ok, I figured out why I thought Tramp didn't support 'signal-process'. 
Elsewhere in Emacs, you can provide the signal to use like so: 
'SIGKILL'. However, Tramp's 'tramp-signal-process' passes the name 
directly to the POSIX "kill" command, which expects the "SIG" to be 
removed. Here's a patch which does this.

[-- Attachment #2: 0001-Support-passing-signals-like-SIGCODE-to-tramp-signal.patch --]
[-- Type: text/plain, Size: 1330 bytes --]

From b0be4e33627bc94d1fb80b61e7013f3cf3b981b1 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 15:07:28 -0700
Subject: [PATCH] Support passing signals like 'SIGCODE' to
 'tramp-signal-process'

POSIX specifies that "kill" should take signal names without the "SIG"
prefix.

* lisp/net/tramp.el (tramp-signal-process): Strip the "SIG" prefix when
present.
---
 lisp/net/tramp.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e8329c82743..16ba4dc8e1c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -6986,8 +6986,13 @@ tramp-signal-process
       (setq pid process
             vec (and (stringp remote) (tramp-dissect-file-name remote))))
      (t (signal 'wrong-type-argument (list #'processp process))))
-    (unless (or (numberp sigcode) (symbolp sigcode))
-      (signal 'wrong-type-argument (list #'numberp sigcode)))
+    (cond
+     ((symbolp sigcode)
+      (setq sigcode (symbol-name sigcode))
+      (when (string-prefix-p "SIG" sigcode)
+        (setq sigcode (substring sigcode 3))))
+     ((not (numberp sigcode))
+      (signal 'wrong-type-argument (list #'numberp sigcode))))
     ;; If it's a Tramp process, send SIGCODE remotely.
     (when (and pid vec)
       (tramp-message
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-14 22:14         ` Jim Porter
@ 2024-07-14 22:17           ` Jim Porter
  2024-07-15  7:10             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Porter @ 2024-07-14 22:17 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 72013, the_wurfkreuz

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

On 7/14/2024 3:14 PM, Jim Porter wrote:
> On 7/10/2024 12:33 AM, Michael Albinus via Bug reports for GNU Emacs, 
> the Swiss army knife of text editors wrote:
>> Tramp ought to support signal-process (and interrupt-process). See
>> optional argument REMOTE of signal-process.
>>
>> Best regards, Michael.
> 
> Ok, I figured out why I thought Tramp didn't support 'signal-process'. 
> Elsewhere in Emacs, you can provide the signal to use like so: 
> 'SIGKILL'. However, Tramp's 'tramp-signal-process' passes the name 
> directly to the POSIX "kill" command, which expects the "SIG" to be 
> removed. Here's a patch which does this.

Whoops, we should be case-insensitive about things here. Fixed in the 
attached patch.

[-- Attachment #2: 0001-Support-passing-signals-like-SIGCODE-to-tramp-signal.patch --]
[-- Type: text/plain, Size: 1339 bytes --]

From ae65d1a5bd296c16aade42deae85e8af28089d30 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 15:07:28 -0700
Subject: [PATCH] Support passing signals like 'SIGCODE' to
 'tramp-signal-process'

POSIX specifies that "kill" should take signal names without the "SIG"
prefix.

* lisp/net/tramp.el (tramp-signal-process): Strip the "SIG" prefix when
present.
---
 lisp/net/tramp.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e8329c82743..5c7236011b8 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -6986,8 +6986,13 @@ tramp-signal-process
       (setq pid process
             vec (and (stringp remote) (tramp-dissect-file-name remote))))
      (t (signal 'wrong-type-argument (list #'processp process))))
-    (unless (or (numberp sigcode) (symbolp sigcode))
-      (signal 'wrong-type-argument (list #'numberp sigcode)))
+    (cond
+     ((symbolp sigcode)
+      (setq sigcode (upcase (symbol-name sigcode)))
+      (when (string-prefix-p "SIG" sigcode)
+        (setq sigcode (substring sigcode 3))))
+     ((not (numberp sigcode))
+      (signal 'wrong-type-argument (list #'numberp sigcode))))
     ;; If it's a Tramp process, send SIGCODE remotely.
     (when (and pid vec)
       (tramp-message
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-14 22:17           ` Jim Porter
@ 2024-07-15  7:10             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-15 11:00               ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-15  7:10 UTC (permalink / raw)
  To: Jim Porter; +Cc: 72013, the_wurfkreuz

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

>> Ok, I figured out why I thought Tramp didn't support
>> 'signal-process'. Elsewhere in Emacs, you can provide the signal to
>> use like so: 'SIGKILL'. However, Tramp's 'tramp-signal-process'
>> passes the name directly to the POSIX "kill" command, which expects
>> the "SIG" to be removed. Here's a patch which does this.
>
> Whoops, we should be case-insensitive about things here. Fixed in the
> attached patch.

Thanks for the patch. LGTM, pls install. Whether in the emacs-30 or
master branch is up to the maintainers, I'm fine with both.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-15  7:10             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-15 11:00               ` Eli Zaretskii
  2024-07-15 16:36                 ` Jim Porter
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2024-07-15 11:00 UTC (permalink / raw)
  To: Michael Albinus; +Cc: jporterbugs, the_wurfkreuz, 72013

> Cc: 72013@debbugs.gnu.org, the_wurfkreuz <the_wurfkreuz@proton.me>
> Date: Mon, 15 Jul 2024 09:10:39 +0200
> From:  Michael Albinus via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Jim Porter <jporterbugs@gmail.com> writes:
> 
> Hi Jim,
> 
> >> Ok, I figured out why I thought Tramp didn't support
> >> 'signal-process'. Elsewhere in Emacs, you can provide the signal to
> >> use like so: 'SIGKILL'. However, Tramp's 'tramp-signal-process'
> >> passes the name directly to the POSIX "kill" command, which expects
> >> the "SIG" to be removed. Here's a patch which does this.
> >
> > Whoops, we should be case-insensitive about things here. Fixed in the
> > attached patch.
> 
> Thanks for the patch. LGTM, pls install. Whether in the emacs-30 or
> master branch is up to the maintainers, I'm fine with both.

The emacs-30 release branch is fine for this, thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-15 11:00               ` Eli Zaretskii
@ 2024-07-15 16:36                 ` Jim Porter
  0 siblings, 0 replies; 11+ messages in thread
From: Jim Porter @ 2024-07-15 16:36 UTC (permalink / raw)
  To: Eli Zaretskii, Michael Albinus; +Cc: 72013, the_wurfkreuz

On 7/15/2024 4:00 AM, Eli Zaretskii wrote:
>> Cc: 72013@debbugs.gnu.org, the_wurfkreuz <the_wurfkreuz@proton.me>
>> Date: Mon, 15 Jul 2024 09:10:39 +0200
>> From:  Michael Albinus via "Bug reports for GNU Emacs,
>>   the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> Thanks for the patch. LGTM, pls install. Whether in the emacs-30 or
>> master branch is up to the maintainers, I'm fine with both.
> 
> The emacs-30 release branch is fine for this, thanks.

Thanks. Pushed to the release branch as 68b7806c319. Leaving this bug 
open for now to do some further work on the Eshell side of things.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly
  2024-07-10  0:22       ` Jim Porter
@ 2024-07-18 19:33         ` Jim Porter
  0 siblings, 0 replies; 11+ messages in thread
From: Jim Porter @ 2024-07-18 19:33 UTC (permalink / raw)
  To: the_wurfkreuz; +Cc: 72013-done

On 7/9/2024 5:22 PM, Jim Porter wrote:
> I've pushed a fix for this to the master branch as 342998511ad. 
> (Skipping the Emacs 30 branch, since this broken behavior has been with 
> us for a long time, and I think it can wait another release.) Could you 
> try it out to see if things work better?

I've pushed an improved version of this to the master branch as 
259f4613bde. It uses remote 'signal-process' when possible, fixes some 
bugs, and also reports an error if 'signal-process' fails for some 
reason (e.g. lack of permissions).

Closing this bug now, but if there's anything still not working, let me 
know.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-18 19:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 13:04 bug#72013: The eshell/kill command doesn't work with eshell/sudo correctly the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 17:02 ` Jim Porter
     [not found]   ` <FzIMSNqLEmByDFP6l93Tg2cAkopa20KM4W1sArsq0kPAfLqDZg5egeKf4wLaqxkGI5DCexUsNta70roOjORbqHIB4w4zZeB_kUgaN8her48=@proton.me>
2024-07-10  0:08     ` Jim Porter
2024-07-10  0:22       ` Jim Porter
2024-07-18 19:33         ` Jim Porter
2024-07-10  7:33       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-14 22:14         ` Jim Porter
2024-07-14 22:17           ` Jim Porter
2024-07-15  7:10             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-15 11:00               ` Eli Zaretskii
2024-07-15 16:36                 ` Jim Porter

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.