From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 06:31:54 2017 Received: (at submit) by debbugs.gnu.org; 5 Nov 2017 11:31:54 +0000 Received: from localhost ([127.0.0.1]:51266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBJ9e-0004Z0-1V for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:31:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBJ9c-0004Ym-Dl for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:31:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBJ9W-000885-HW for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:31:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51557) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eBJ9W-00087v-Dt for submit@debbugs.gnu.org; Sun, 05 Nov 2017 06:31:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBJ9V-0002li-Ab for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:31:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBJ9S-00086S-75 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:31:45 -0500 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:45467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBJ9R-000864-Ve for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2017 06:31:42 -0500 Received: by mail-wr0-x236.google.com with SMTP id y9so6073724wrb.2 for ; Sun, 05 Nov 2017 03:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=2yuEHWO7JfGBN24ZWcn3UPjgAX/pyzi1mTRU/vkv0bQ=; b=pj1mNapdB/kZnNVe8+CZ0zFa0jnOJjWQw80djwcFFqNauRBhi9LMhNjzObO+Hzg0SK wqnbwnqd45hb/Xvg30mA4nKuEvYHuX2j3V9Atcftl8Q7+OaLBOPSWqvpVEypN2n+PWp3 NzptkkvBFf0tKNi0cEzoSOomUK9fn1Zc3lMk7mlGMyUuwCpECzi3UeG98oqThfb+0yxp HNwEQtaURAC9jZU/fyu/84xt0JAdMwnXJ3dSyp1+EKkQk45yYbmnWZqdU9FUyjMIfx0E cs+F+lX6s4J/j/Lf5SzY6IuwLELyl7H6ZZRUxhclbk61omk7EOrzwOS01kAuQcMnVpU3 /ckQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=2yuEHWO7JfGBN24ZWcn3UPjgAX/pyzi1mTRU/vkv0bQ=; b=nc783j3mh+5lTvszE9UG2FqyfuRNM7rQjhnM9jyMB35r0Tkke2WS9ntxsNr5cNdIhP Lpaw9DETQKep9cskMzb4tOVrqOBL7zqjHsWrt/kDAPxpunRhTo5shMJU+EWakeVKUYqk Y21hhL4ieBxxiXpFb50is4W3Avnq50Z+xy9R4HIo8McEGwVost75har+ju0K5vRkiEzH wwyeJJ/eM2pWeqOZkCSTLxS3dP0pstVQT0rVV4qOLqHC3f8Ux7ZrFUIszcjFElVv+xQx dAzEEZJ9rGBRcYIMoXvw8cmNyEeq2MDp9R4P5Hnx8SmRWHl2eQN2o6x4JVeGZZzX5qbR 4zlg== X-Gm-Message-State: AJaThX5aD67Yh9v4i0nztj8wPWl0Bz5qftRp2Y4eNghbeg68Y+f8YTH/ V7SpgrzgB/uD92iH0o39Gmepyw== X-Google-Smtp-Source: ABhQp+TrJSWOM1vY74SLZpfhNy/q85v90/6xwYIxd9xcFyFY1+y9ESdnEkqc+nmWiHL0/1XgN3ZxVg== X-Received: by 10.223.151.211 with SMTP id t19mr2278946wrb.2.1509881500679; Sun, 05 Nov 2017 03:31:40 -0800 (PST) Received: from dhiov23k ([197.0.145.22]) by smtp.gmail.com with ESMTPSA id n2sm18515090wmd.39.2017.11.05.03.31.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 03:31:40 -0800 (PST) User-agent: mu4e 0.9.18; emacs 25.3.1 From: Pierre Neidhardt To: bug-gnu-emacs@gnu.org Subject: 25.3; eshell/kill does not understand - Date: Sun, 05 Nov 2017 12:31:38 +0100 Message-ID: <87vaiprmg5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) - emacs -Q - M-x eshell ~ $ kill -9 emacs kill: bad pid: -9 In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16) of 2017-11-05 built on dhiov23k Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 System Description: Gentoo Base System release 2.4.1 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.3 --htmldir=/usr/share/doc/emacs-25.3/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --without-dbus --without-modules --without-gpm --without-hesiod --without-kerberos --without-kerberos5 --with-xml2 --without-selinux --with-gnutls --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets GENTOO_PACKAGE=app-editors/emacs-25.3 'CFLAGS=-march=ivybridge -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB GTK3 X11 Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 07:38:47 2017 Received: (at 29156) by debbugs.gnu.org; 5 Nov 2017 12:38:47 +0000 Received: from localhost ([127.0.0.1]:51313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBKCM-0003eo-Qw for submit@debbugs.gnu.org; Sun, 05 Nov 2017 07:38:47 -0500 Received: from mail-it0-f47.google.com ([209.85.214.47]:56811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBKCL-0003eX-71; Sun, 05 Nov 2017 07:38:45 -0500 Received: by mail-it0-f47.google.com with SMTP id r127so2192319itb.5; Sun, 05 Nov 2017 04:38:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZYE7lsXoholcm6jd1eJliTvGhKwNWwer4YgcsAq6fJs=; b=UpUjlXVJlLAi5eewXwoO9kzQF9EmHBckCbjM/dU2linkkgmHmD3Hn3aMrGI0OGwFKr LlctSLFRlnmVvZdEuvEYddbwNPWq+DUPo1b6SZuE56+mItdZeH+d2jR3kC7vTzm4ftQ1 iagppJADd4sMREMwjchrpNNE0Hhz35wEN/R9BbjaC2YH60uXE11tDSx8d/fMNwgWoZz1 Am45B+9TPLJTnrLSLS/IkueEIrjzbhezrvM1pATglNEkD00GrVhN3Uz0LuITg09EmMX5 8uqkgEVzLtssMbSwfFl205yt87BETncpa8mVaceljfDODd3jj+6gIr9myZkHRVtuik/K gNCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ZYE7lsXoholcm6jd1eJliTvGhKwNWwer4YgcsAq6fJs=; b=ATXupwQFlTUxRJ0823hcSE1ll7agTvj14xMySDMNO9IvAuJblApIsjc/NORpm1wZqg g/fovr1Aw4AqYsbbyOAnq0qBuuQ/KKoTd64nrgXOkhVrBBayrb66wGrhusrj0zWAJArX DNUrIp53RlxTpaFygztpdX3r1DmgkJUuCXUgd3nTsnMKfcRML+oRbAjUUJUoQTFyl4kS lrhAcCWqxEhPII4C+VYbKooM9qc4KJGoaQYeBJOrknrGOUtLlrcvnhCnUhaEBuYoz+Re kdl5cyIYW+QVcIKW/pMUV0dLT9hN73SsrcKS46eyxciJ8c+W3YqjvsS4VeW+0nB89tEb nP0Q== X-Gm-Message-State: AJaThX5sceGHbFjw6qNNGVoOLyVHREQqoAOQntAcZiHIE4rCfscMBUAw 2SWw+WSMlDPIV/D3eyR9RG9qlA== X-Google-Smtp-Source: ABhQp+RpbBLqlqCTIJQ3OP7xrLt4fTqsRXlZgekYBBkYHm1pB00KZrsIFohdnQFZpa3t1kxo9w8N2g== X-Received: by 10.36.254.140 with SMTP id w134mr5680452ith.73.1509885519445; Sun, 05 Nov 2017 04:38:39 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m145sm3438096itg.4.2017.11.05.04.38.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 04:38:38 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#29156: 25.3; eshell/kill does not understand - References: <87vaiprmg5.fsf@gmail.com> Date: Sun, 05 Nov 2017 07:38:37 -0500 In-Reply-To: <87vaiprmg5.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 05 Nov 2017 12:31:38 +0100") Message-ID: <87o9og7vea.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 29156 Cc: 29156@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 29156 + confirmed quit Pierre Neidhardt writes: > - emacs -Q > - M-x eshell > > ~ $ kill -9 emacs > kill: bad pid: -9 This bit converts the "-9" into an integer: (defun eshell-lisp-command (object &optional args) ... ;; if any of the arguments are flagged as numbers ;; waiting for conversion, convert them now (unless (get object 'eshell-no-numeric-conversions) (while args (let ((arg (car args))) (if (and (stringp arg) (> (length arg) 0) (not (text-property-not-all 0 (length arg) 'number t arg))) (setcar args (string-to-number arg)))) (setq args (cdr args)))) ... Whereas this bit expects "-9" as a string: (defun eshell/kill (&rest args) ... (when (stringp arg) (cond ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) (setq signum (abs (string-to-number arg))))) ... Using "-SIGKILL" doesn't work either, because eshell/kill calls `string-to-number' on it, giving 0. Apparently nobody ever actually used this feature before. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 22 21:40:23 2017 Received: (at control) by debbugs.gnu.org; 23 Nov 2017 02:40:23 +0000 Received: from localhost ([127.0.0.1]:53247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHhR9-0000Mp-5K for submit@debbugs.gnu.org; Wed, 22 Nov 2017 21:40:23 -0500 Received: from mail-io0-f182.google.com ([209.85.223.182]:36530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHhR7-0000Md-SS for control@debbugs.gnu.org; Wed, 22 Nov 2017 21:40:22 -0500 Received: by mail-io0-f182.google.com with SMTP id 79so17641986ioi.3 for ; Wed, 22 Nov 2017 18:40:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=sfCiZ/A0zYqXBdQ3hSH/Zb7m9bGUugjFCKgq7AJB38M=; b=Nu835UPPMKF9wK4/C8ljnyyiqRNyXko2wHPKtq+uDUj2JDziNQoJ71Mb/Ppt5T+rFz JjQ+9FRsH3BStBF3m+NrKnFhcuENfjU1NPYnLU1l49yUQEKrm37DLJ7HMCz0lBejRcF1 HRVmt9uds4MK0BFDVzh0hEt3apgRi4QA+G2TO3IFbe42YpcUsKGC74uKRqfqYYkIhppT mCqTkdG2mvsKx8LmMenn1SHiqzCTvcokstS5cSbWnJp2FqaU71y2+NbfBlMQ+vd8hEw7 Wwwfp411N+XiT2HJTXZsN5fsT+cfDV/+jknIDmtIVcdq0DvmNc7L9maKApkvGAPiPNOL vKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=sfCiZ/A0zYqXBdQ3hSH/Zb7m9bGUugjFCKgq7AJB38M=; b=nd66A9a3o6pXMGKRaRXKuLcozD0LFNURKiGgZdaJEkCL1Ifbf6kqZzT0BELnjOPIYT npKWAjjesgc0UqCmUIozQxAbOnzgSqaQ+orOJ8KZhEFk0Zul19OhL1AMYiAy3KVE/lnd qEEFINcx9SDJv3k/3BERQpODt4JYX51sHGZok6A7ZWEXqTyNoACLgtNi1wj5eSMpgA37 ch/EYfNlLB4Moze/bz5bwT/SIe8zgbtUAC/P8DFBUwNinSqfYXRj0HzhHqWdRzP97x9d 8R6FNM7j153H515kWZ0HKZjvBtZKIpNbZcGvN8GVtK3btZU14md6+7lMSLqL7OXOjBMc gT5w== X-Gm-Message-State: AJaThX5DKRaFWjBDpvVBYIZebueH2yiEO1fWPvXaM18Wna8uE/sTjHnI w7eeec3bEMX5T2tqLeeMo4QySQ== X-Google-Smtp-Source: AGs4zMZ2X13u4WbQw5q2+7xg7Gf5WbHem4xHInu1vzL3FMIABg1hn0APOz62Hs3UGhIr8ny6C9dDHQ== X-Received: by 10.107.195.14 with SMTP id t14mr11173214iof.238.1511404815626; Wed, 22 Nov 2017 18:40:15 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id i190sm2791796itb.33.2017.11.22.18.40.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2017 18:40:14 -0800 (PST) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #29156 Date: Wed, 22 Nov 2017 21:40:13 -0500 Message-ID: <87vai1zpiq.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) tags 29156 + easy quit From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 16 20:21:57 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 00:21:57 +0000 Received: from localhost ([127.0.0.1]:37418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewzbh-0000Zg-4k for submit@debbugs.gnu.org; Fri, 16 Mar 2018 20:21:57 -0400 Received: from mail-it0-f45.google.com ([209.85.214.45]:54541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewzbd-0000ZP-0W for 29156@debbugs.gnu.org; Fri, 16 Mar 2018 20:21:53 -0400 Received: by mail-it0-f45.google.com with SMTP id w3-v6so4065423itc.4 for <29156@debbugs.gnu.org>; Fri, 16 Mar 2018 17:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=MrCvn+rnPEk78QNVcBrFyAF5hUlZfhBuXQ9g35BO8yE=; b=INorllDN/8AGVqxz8USUHChE4Imz9K3hsgVdhYpO413QzphLlripCbNF5lDbEaML9H qcouH1fKkIhSG9PVO4e+E/dXDcLKpCvxc6fLHzDlZG2BHR8dtOl9tLM+bYcAblTis1DI VmKrsZwyNjKADvVkWk++VUNKISDkcjHlyf0Re32M2an61ePSlgeNemRzc5pm8/LkwOYL yoyKmOU+5NwMF4VpRv43xHxA1hjcqpeYuIewlwQPwSQjg+5pqkw/hIqPXxiX4nTbRpAm QRmV5nPFvgFygPMx6e2bXee4TTfaSlX5pcYMNq95Jv5WpAapIjOc3TDWC9KKmA4frfWe H82A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=MrCvn+rnPEk78QNVcBrFyAF5hUlZfhBuXQ9g35BO8yE=; b=qvHT4GeIFUTm88g7iH/Jm6Xr2Lbq8ZhtTJm3RurhZSAzO+KHZxw7sZG6kjMnJfmIsV 6AmzlOxS68BIrMCcy2i/XR0By7HBTNF2Lxn32SucIy881pnV0LNhiVNZSpJA9PfW+8Ks TYJLBf3JUVNn0Jjc+90kNpHIvgov1lDrNoY87lG+qv5TNQzYu/I4q+/Gli87WIoRey+H gcVqcawPxHZ9O2oKHlOaVrwpVweFN1FfxjnBP/dNNjGYIitAIiDlzS8+1KZZwggiEx+f /y3GUxk21abdlMxEfuX9ydRWzydP/yY9rKoDVvryJPxOvuxdMGT39sNCDWCv0IgyJFI1 cfmQ== X-Gm-Message-State: AElRT7Gqw7le69cic/qEe8N2/qiNBqZqqSn8FnOpDiMaW4aNtTYGL+Wh zwBR58beZc/W70EtuOGN2xk= X-Google-Smtp-Source: AG47ELsibjQ4KsHiv7SB3qT3BEd5pSuwcILifteXmLUGaAMfz0MUdg/AVqOD1jnxE0QErvPlTdfQHw== X-Received: by 2002:a24:98d6:: with SMTP id n205-v6mr4285143itd.130.1521246107531; Fri, 16 Mar 2018 17:21:47 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id o75-v6sm5314219ito.15.2018.03.16.17.21.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 17:21:46 -0700 (PDT) From: Noam Postavsky To: 29156@debbugs.gnu.org Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - Date: Fri, 16 Mar 2018 20:21:46 -0400 Message-ID: <87o9jnv9et.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Eric Skoglund , Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --==-=-= Content-Type: text/plain [forwarding to list] --==-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Eric Skoglund To: Noam Postavsky Subject: Re: bug#29156: 25.3; eshell/kill does not understand - References: <87vaiprmg5.fsf@gmail.com> <87o9og7vea.fsf@users.sourceforge.net> Date: Fri, 16 Mar 2018 15:01:32 +0100 In-Reply-To: <87o9og7vea.fsf@users.sourceforge.net> (Noam Postavsky's message of "Sun, 05 Nov 2017 07:38:37 -0500") Message-ID: <87fu50ktkz.fsf@pagefault.se> X-Headers-End: 1ewpvP-00GZmT-2I MIME-Version: 1.0 Content-Type: text/plain --=-=-= Content-Type: text/plain First time contributor. Here's a patch that allows eshell/kill to handle both the -9 case and the -SIGKILL case. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Make-eshell-kill-handle-signal-and-SIGNALNAME.patch Content-Description: eshell/kill patch >From 2789c82b27cfac175d6d04260db78a54a2f26b01 Mon Sep 17 00:00:00 2001 From: Eric Skoglund Date: Fri, 16 Mar 2018 14:49:56 +0100 Subject: [PATCH] Make eshell/kill handle - and - * lisp/eshell/esh-proc.el: Handle - and - --- lisp/eshell/esh-proc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index b3bd7a7245..6dab6636b0 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -178,12 +178,12 @@ eshell/kill ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) - (setq signum (abs (string-to-number arg))))) + (setq signum (make-symbol (substring arg 1 (length arg)))))) (setq args (cdr args)))) (while args (let ((arg (if (eshell-processp (car args)) (process-id (car args)) - (car args)))) + (string-to-number (car args))))) (when arg (cond ((null arg) -- 2.13.6 --=-=-=-- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 16 20:34:35 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 00:34:35 +0000 Received: from localhost ([127.0.0.1]:37427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewznu-0000uT-RM for submit@debbugs.gnu.org; Fri, 16 Mar 2018 20:34:35 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:50667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewzns-0000uD-QH for 29156@debbugs.gnu.org; Fri, 16 Mar 2018 20:34:33 -0400 Received: by mail-it0-f53.google.com with SMTP id d13-v6so4093767itf.0 for <29156@debbugs.gnu.org>; Fri, 16 Mar 2018 17:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TOc8Ej1tab6AQrfSb8Q8qhutqZq7v9bZHM1QkKb3SzQ=; b=WpzsCeyJTBuFWbOtU8hR3JgVax6x/d/zwboz6aFEg3JkXpKkUO7o0BYVZksW02YSV1 dvolkDsz0sg62cqVTvUIBwgVT5xzHn/p4DPHHYCXX6c1SPZ6xqi79B7+0oC11V4htr+E DeonjMjgnpzvcVIAncuc4Fk37eo0/ZgClWBZcVVzrDxrol7j7U6zDJGaidI85tAixvTV fFiE4BtsKsCsft0jWHjyEb6sVwlvZtoIyESbBrsIwZpxb3KpjIaROMaKgXj3RVq/RAaw sOsKdDMEnqcVEjT5qiS/fJ7i2tElktoTL1VISSwBvmTplgrK0ImQx+r2EgF844a8k7IN O5OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=TOc8Ej1tab6AQrfSb8Q8qhutqZq7v9bZHM1QkKb3SzQ=; b=UmPCOAOMVePBvGePift+eWi4GEXcg/CGmVV3srmR3uWFWsLdLY19oYgLKtE2msBw91 TTFB3sDukhpTfACG8Yt799S8hDP8mSmd7TDtratc5TXQxsCSmshpWS3jMJXA06ouHqxt k0q11Yo1YfBg1Kc5Tx33hggpKX1q/dgogNxXh9IGn0X6fnhAmt7NSTySAbY2ncg24QF2 eRcLX85KC+Uv7aIyoWp9vW/QAaOUc16cfYnP2czdCv7kZ2Kn2GsgwG4I0ajWHGxjwF06 H0k6mAcqYT7v8FXfyL1d0pxQ3CzmsvuoupSC6Xa1EM8FxVaiRhWCp2QrKuy17gkqyfM5 jI6g== X-Gm-Message-State: AElRT7HNDUm9UreeBkD9VQOqlIJWcBnn0Jvns4pAfnTUXlMUQ1jbxlHk Y7BKiUEyvp9KSSctrMwXCBA= X-Google-Smtp-Source: AG47ELtzRrrzCXJ8I/ODJXu1/t80IYKM9Pd6fRl/4HAY31uxRl4VaNoUVW3FUC1feQAWxl/1iY6s+w== X-Received: by 2002:a24:8c:: with SMTP id 134-v6mr4523918ita.70.1521246867130; Fri, 16 Mar 2018 17:34:27 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 199-v6sm2041683itl.1.2018.03.16.17.34.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 17:34:26 -0700 (PDT) From: Noam Postavsky To: 29156@debbugs.gnu.org Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> Date: Fri, 16 Mar 2018 20:34:25 -0400 In-Reply-To: <87o9jnv9et.fsf@gmail.com> (Noam Postavsky's message of "Fri, 16 Mar 2018 20:21:46 -0400") Message-ID: <87lgerv8tq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29156 Cc: Eric Skoglund , Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > From: Eric Skoglund > First time contributor. Here's a patch that allows eshell/kill to handle > both the -9 case and the -SIGKILL case. Thanks! > * lisp/eshell/esh-proc.el: Handle - and - Minor formatting nitpick, you should have the function name here: * lisp/eshell/esh-proc.el (eshell-kill): ... More importantly, could you explain a bit how your change works/why it's correct? > ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) > - (setq signum (abs (string-to-number arg))))) > + (setq signum (make-symbol (substring arg 1 (length arg)))))) Not sure this `make-symbol' call, should it rather be `intern'? (Maybe we should update signal-process take a string as well a symbol.) > (setq args (cdr args)))) > (while args > (let ((arg (if (eshell-processp (car args)) > (process-id (car args)) > - (car args)))) > + (string-to-number (car args))))) I think the args have already been converted to numbers, or did you mean to also add a (put 'eshell/kill 'eshell-no-numeric-conversions t)? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 04:58:44 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 08:58:44 +0000 Received: from localhost ([127.0.0.1]:37495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ex7fo-0006VU-B2 for submit@debbugs.gnu.org; Sat, 17 Mar 2018 04:58:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ex7fm-0006VF-GO for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 04:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ex7fg-0004HA-I4 for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 04:58:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ex7fa-0004FH-4T; Sat, 17 Mar 2018 04:58:30 -0400 Received: from [176.228.60.248] (port=1847 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ex7fZ-0000Cy-HK; Sat, 17 Mar 2018 04:58:29 -0400 Date: Sat, 17 Mar 2018 10:58:32 +0200 Message-Id: <83lgeroz7r.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87lgerv8tq.fsf@gmail.com> (message from Noam Postavsky on Fri, 16 Mar 2018 20:34:25 -0400) Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29156 Cc: 29156@debbugs.gnu.org, eric@pagefault.se, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Date: Fri, 16 Mar 2018 20:34:25 -0400 > Cc: Eric Skoglund , Pierre Neidhardt > > > ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) > > - (setq signum (abs (string-to-number arg))))) > > + (setq signum (make-symbol (substring arg 1 (length arg)))))) > > Not sure this `make-symbol' call, should it rather be `intern'? Yes, I think intern is better here. > (Maybe we should update signal-process take a string as well a > symbol.) Possibly. Btw, the doc string of eshell/kill should be updated to reflect the fact we now support symbolic names of Unix signals. Also, NEWS and the Eshell manual should be updated. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 10:43:13 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 14:43:13 +0000 Received: from localhost ([127.0.0.1]:38561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exD3B-0000AP-2p for submit@debbugs.gnu.org; Sat, 17 Mar 2018 10:43:13 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:39425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exD39-0000AB-Rw for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 10:43:12 -0400 Received: by mail-io0-f172.google.com with SMTP id v13so2193305iob.6 for <29156@debbugs.gnu.org>; Sat, 17 Mar 2018 07:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=JKBeIEpPiqNQ/umeMPDM5GQzNphnapMRXC/sZT/QBcY=; b=Kg0CmRokIXtffTN/w77PMh4WKz1nvK9w/qH9h3shOhiPNoS9IBPeQ4ozbkunn7+57o oHUAA6622Jw+vB5/8Kg37h9cVvmvkHKoA6HN4jDzgU8sjr9Sun/ca6gc5Cc6LYNjPzcT bbd1G3EACBi6edvOx5n6Vm6NDID90fI9Agzctlu6eceoD4CmD4qxtToNBQ8OFopyln04 XV/5OZP8yh4+0SQJYsro4DaWWqgvUJ5WdMYjHkSvKDx8Wl19ycVOR+NDuzs5+s+cGKK8 gGHpDveoExgECgytWLOxeHELhxgw9PKfQwvs4hGydoVYNjwnvkRDyq+9B5AB2dO4ctBh 6XSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=JKBeIEpPiqNQ/umeMPDM5GQzNphnapMRXC/sZT/QBcY=; b=BtIKWeVSdAsph0hMS2bDnXWKUr5jf/ZXy2k7K7vhM+cmgdpp43zXwidNhOKPSHIbhj JR22uC5XRsT/Dhc9KBV1wn5QPbeYq00INvod67SDXr9Nh4NDMvTMT/N+5p8D7yGV10/4 +YUfU/2l//v188pEaE43zI3q6wQ7rIAuA5ySBKZX8n1uTVMPID2CtioJqVS+RxTu5Qv+ 26fM4JTH4HsLm61Dw1YetJYPMriAOcTAYXXaRC8VAttVllQ21Bx0zJSuL0T+kCug3jpS JC2tDuVlEGHeVRTgP6rN+XUo/kJj2tx/GQb0f8gghicdh/NqT1PCKJWhS+GXTjmp7hUA +gew== X-Gm-Message-State: AElRT7ECUdHHVzM0G7lXGohJyEC6YQmZFJCDLTzLUAc+427xjhDyqZVL dc0SNu4nK3LXLcU/7XHTiQs= X-Google-Smtp-Source: AG47ELutRhjvurWZa4ZBMhnq60G4VmByZ/Wj5efehQZvSqwez0gB3glzFvvnyPYyFh5QqVOkONFk1g== X-Received: by 10.107.183.4 with SMTP id h4mr5869388iof.201.1521297786337; Sat, 17 Mar 2018 07:43:06 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id k199sm6013423itb.35.2018.03.17.07.43.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Mar 2018 07:43:05 -0700 (PDT) From: Noam Postavsky To: 29156@debbugs.gnu.org Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - Date: Sat, 17 Mar 2018 10:43:04 -0400 Message-ID: <878taqvk3r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Eric Skoglund , Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain [forwarding to list, please use "Reply All" to keep 29156@debbugs.gnu.org on Cc] --=-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Eric Skoglund To: Noam Postavsky Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> Date: Sat, 17 Mar 2018 15:11:41 +0100 In-Reply-To: <87lgerv8tq.fsf@gmail.com> (Noam Postavsky's message of "Fri, 16 Mar 2018 20:34:25 -0400") Message-ID: <877eqa7pwi.fsf@pagefault.se> MIME-Version: 1.0 Content-Type: text/plain Thanks for the review! > More importantly, could you explain a bit how your change works/why it's > correct? I'm guessing you mean in the commit message and not here in the bug report right? > Not sure this `make-symbol' call, should it rather be `intern'? (Maybe > we should update signal-process take a string as well a symbol.) Saw that Eli also agreed, for future reference when do we want to use `make-symbol` vs `intern`? > I think the args have already been converted to numbers, or did you mean > to also add a (put 'eshell/kill 'eshell-no-numeric-conversions t)? Yes indeed. I'm unsure how I managed to lose that in git... // Eric --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 10:54:56 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 14:54:56 +0000 Received: from localhost ([127.0.0.1]:38565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exDEW-0000Sg-5a for submit@debbugs.gnu.org; Sat, 17 Mar 2018 10:54:56 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:52624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exDET-0000SS-NX for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 10:54:54 -0400 Received: by mail-it0-f44.google.com with SMTP id k135-v6so5392430ite.2 for <29156@debbugs.gnu.org>; Sat, 17 Mar 2018 07:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6FE2UZ9h1TaN8cUWVo/XQZpDrZlm85Tb7hP7oLvxPtA=; b=Z0O1UgZ2hAjPclhu8IrWoLXIMw4vGTWHjMoXk5LtNPiWsTRN9Chn96yXNO1Fo/o1St sNLTbBJolShrdGhjIkXzWBMlUDR8uYsFbkrm7wJMePQAY8rxuYv5uguX2IoaXq0Ao/9g KoTYbQho0fp/KLzW14Rcq/0vU11nf7KXsyNZVUdQzzF6JZ6nwXxL82KG6/9fJanF9MMQ LmkRVAXcRQjUzPboQOGt6HzWB5DDop/lQY6zcJFx3EPue1ZamjbRwoaAO6erI4eDJJrc QjDzzxW/x93w9ykcNienSEwMQ+G07mFWyeii2DOH56NrwABWoo5xrRf7/ZJtIuplJPmN Tnuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6FE2UZ9h1TaN8cUWVo/XQZpDrZlm85Tb7hP7oLvxPtA=; b=UTddMkaZDp7UC0/bI+fp2SlSxhmimmaXf40vNgD5PV9Z4hXcWroM/rA1OBdCEw4AKD 3PHSsg6LXAq8G1iKJFSCRVUwHNsIAwsV3y05J27zZz6G9Njv3mCkCyukJ7m0fW/jIxKb rDUDqCh5Dikr18rDGeiNFlwoKmTUV2gsys0GlN8Ezmy6yk8ja14GDjwg2aKVnGuz6fC5 hEZFHx7SvPmw4T/uHFW9hM122HJewlFiKmABWuyVAah1StT9C/MmuO+n6PE7ILlMZT4L 9hT6VFIM9ynUZwd0If5eMCBUrQqlb69zU+yT5ybQHVOaswYtb87Ia9brUMqvEHLmodTj /b4g== X-Gm-Message-State: AElRT7FrXs6Q6JNrKGwi5ZzBYbIjo20BnKdHjNsRxaCP8wLJTG4pxYqf 8LPWrXL4I3KHz9zcOSf6Nwg= X-Google-Smtp-Source: AG47ELts/0P+nl25tPCtGLaLPTb0Hkl1npiaON/wutqmv6DrvqcZ0WXXgRtN24qoixIw0i9ZF536hw== X-Received: by 2002:a24:6794:: with SMTP id u142-v6mr6041122itc.19.1521298488007; Sat, 17 Mar 2018 07:54:48 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id w132sm5907178itf.6.2018.03.17.07.54.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Mar 2018 07:54:47 -0700 (PDT) From: Noam Postavsky To: 29156@debbugs.gnu.org Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <878taqvk3r.fsf@gmail.com> Date: Sat, 17 Mar 2018 10:54:46 -0400 In-Reply-To: <878taqvk3r.fsf@gmail.com> (Noam Postavsky's message of "Sat, 17 Mar 2018 10:43:04 -0400") Message-ID: <87605uvjk9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Eric Skoglund , Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > From: Eric Skoglund >> More importantly, could you explain a bit how your change works/why it's >> correct? > > I'm guessing you mean in the commit message and not here in the bug > report right? Either, both :) (If you send a new patch with the explanation in the commit message, it's automatically in the bug report as well anyway) >> Not sure [about] this `make-symbol' call, should it rather be >> `intern'? (Maybe we should update signal-process take a string as >> well a symbol.) > > Saw that Eli also agreed, for future reference when do we want to use > `make-symbol` vs `intern`? Usually, `make-symbol' is only for macros, where you want a symbol that is not `eq' to any other. Sometimes it's handy for making a unique object at run-time. In this case, since we only care about the symbol name, it doesn't really matter, it's just a bit surprising to see it because it's usually a mistake in a non-macro context. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 14:08:06 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 18:08:06 +0000 Received: from localhost ([127.0.0.1]:38640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exGFS-0005OQ-I5 for submit@debbugs.gnu.org; Sat, 17 Mar 2018 14:08:06 -0400 Received: from pagefault.se ([31.7.186.167]:49132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exFrg-0004ig-3B for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 13:43:32 -0400 Received: by pagefault.se (Postfix, from userid 5555) id E12AA9220107; Sat, 17 Mar 2018 17:43:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on pagefault.se X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable version=3.3.2 Received: from pagefault.se (c-460be255.07-19-73746f67.cust.bredbandsbolaget.se [85.226.11.70]) by pagefault.se (Postfix) with ESMTPSA id 6A2F89220101; Sat, 17 Mar 2018 17:43:30 +0000 (UTC) From: Eric Skoglund To: Eli Zaretskii Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> Date: Sat, 17 Mar 2018 18:43:29 +0100 In-Reply-To: <83lgeroz7r.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Mar 2018 10:58:32 +0200") Message-ID: <87zi3661j2.fsf@pagefault.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 X-Mailman-Approved-At: Sat, 17 Mar 2018 14:08:05 -0400 Cc: 29156@debbugs.gnu.org, Noam Postavsky , ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Noam Postavsky >> Date: Fri, 16 Mar 2018 20:34:25 -0400 >> Cc: Eric Skoglund , Pierre Neidhardt >> >> > ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) >> > - (setq signum (abs (string-to-number arg))))) >> > + (setq signum (make-symbol (substring arg 1 (length arg)))))) >> >> Not sure this `make-symbol' call, should it rather be `intern'? > > Yes, I think intern is better here. > >> (Maybe we should update signal-process take a string as well a >> symbol.) > > Possibly. > > Btw, the doc string of eshell/kill should be updated to reflect the > fact we now support symbolic names of Unix signals. Also, NEWS and > the Eshell manual should be updated. Here is an updated patch which hopefully fixes all the issues with the previous. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Make-eshell-kill-handle-signal-and-SIGNALNAME.patch Content-Description: Patch v2 >From 54bca6f5420d80abeaf9c1da5b73d50112eaab71 Mon Sep 17 00:00:00 2001 From: Eric Skoglund Date: Fri, 16 Mar 2018 14:49:56 +0100 Subject: [PATCH] Make eshell/kill handle - and - * lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing and numeric conversion in function in order to parse -signal and -SIGNALNAME correctly. --- doc/misc/eshell.texi | 2 +- etc/NEWS | 5 +++++ lisp/eshell/esh-proc.el | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 80077e5ccd..bda6159488 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -330,7 +330,7 @@ Built-ins @item kill @cmindex kill Kill processes. Takes a PID or a process object and an optional -signal specifier. +signal specifier which can either be a number or a signal name. @item listify @cmindex listify diff --git a/etc/NEWS b/etc/NEWS index b6c4157384..bfd9a33040 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -273,6 +273,11 @@ To restore the old behavior, use *** The function 'shell-uniquify-list' has been renamed from 'eshell-uniqify-list'. +*** The function eshell/kill is now able to handle signal switches. +Previously eshell/kill would fail if provided a kill signal to send to the +process. It now handles both numeric signals and the string version of +the signals. + ** Pcomplete *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index b3bd7a7245..1fe4b324a6 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -167,7 +167,8 @@ eshell/jobs (defun eshell/kill (&rest args) "Kill processes. Usage: kill [-] | ... -Accepts PIDs and process objects." +Accepts PIDs and process objects. Optionally accept signals +and signal names." ;; If the first argument starts with a dash, treat it as the signal ;; specifier. (let ((signum 'SIGINT)) @@ -178,12 +179,12 @@ eshell/kill ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) - (setq signum (abs (string-to-number arg))))) + (setq signum (intern (substring arg 1 (length arg)))))) (setq args (cdr args)))) (while args (let ((arg (if (eshell-processp (car args)) (process-id (car args)) - (car args)))) + (string-to-number (car args))))) (when arg (cond ((null arg) @@ -198,6 +199,8 @@ eshell/kill (setq args (cdr args)))) nil) +(put 'eshell/kill 'eshell-no-numeric-conversions t) + (defun eshell-read-process-name (prompt) "Read the name of a process from the minibuffer, using completion. The prompt will be set to PROMPT." -- 2.13.6 --=-=-= Content-Type: text/plain // Eric --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 15:19:36 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 19:19:36 +0000 Received: from localhost ([127.0.0.1]:38670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exHMc-00077c-9Q for submit@debbugs.gnu.org; Sat, 17 Mar 2018 15:19:36 -0400 Received: from pagefault.se ([31.7.186.167]:48070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exHMa-00077U-DD for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 15:19:32 -0400 Received: by pagefault.se (Postfix, from userid 5555) id D95D69220105; Sat, 17 Mar 2018 19:19:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on pagefault.se X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable version=3.3.2 Received: from pagefault.se (c-460be255.07-19-73746f67.cust.bredbandsbolaget.se [85.226.11.70]) by pagefault.se (Postfix) with ESMTPSA id A3AF09220101; Sat, 17 Mar 2018 19:19:28 +0000 (UTC) From: Eric Skoglund To: 29156@debbugs.gnu.org, 29156@https: Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <878taqvk3r.fsf@gmail.com> <87605uvjk9.fsf@gmail.com> Date: Sat, 17 Mar 2018 20:19:27 +0100 In-Reply-To: <87605uvjk9.fsf@gmail.com> (Noam Postavsky's message of "Sat, 17 Mar 2018 10:54:46 -0400") Message-ID: <87po425x34.fsf@pagefault.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Noam Postavsky , Pierre Neidhardt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Noam Postavsky writes: >> >> Saw that Eli also agreed, for future reference when do we want to use >> `make-symbol` vs `intern`? > > Usually, `make-symbol' is only for macros, where you want a symbol that > is not `eq' to any other. Sometimes it's handy for making a unique > object at run-time. In this case, since we only care about the symbol > name, it doesn't really matter, it's just a bit surprising to see it > because it's usually a mistake in a non-macro context. Thanks for the clarification! PS. Not sure why I'm not seeing my replies in debbugs-gnu so sorry for the extra work in forwarding them. Tried changing the To header to the bug mail adress, let's se if that works. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 15:34:00 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 19:34:00 +0000 Received: from localhost ([127.0.0.1]:38675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exHaY-0007Tw-Cj for submit@debbugs.gnu.org; Sat, 17 Mar 2018 15:34:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exHaW-0007Tg-Md for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 15:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exHaP-0003mk-N9 for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 15:33:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exHaL-0003eV-Rz; Sat, 17 Mar 2018 15:33:45 -0400 Received: from [176.228.60.248] (port=3478 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1exHaL-0003Q1-Ab; Sat, 17 Mar 2018 15:33:45 -0400 Date: Sat, 17 Mar 2018 21:33:48 +0200 Message-Id: <83a7v6pkdf.fsf@gnu.org> From: Eli Zaretskii To: Eric Skoglund In-reply-to: <87zi3661j2.fsf@pagefault.se> (message from Eric Skoglund on Sat, 17 Mar 2018 18:43:29 +0100) Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> <87zi3661j2.fsf@pagefault.se> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29156 Cc: 29156@debbugs.gnu.org, npostavs@gmail.com, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Eric Skoglund > Cc: Noam Postavsky , 29156@debbugs.gnu.org, ambrevar@gmail.com > Date: Sat, 17 Mar 2018 18:43:29 +0100 > > * lisp/eshell/esh-proc.el (eshell/kill): > Handle the argument parsing and numeric conversion in function > in order to parse -signal and -SIGNALNAME correctly. > --- > doc/misc/eshell.texi | 2 +- > etc/NEWS | 5 +++++ > lisp/eshell/esh-proc.el | 9 ++++++--- > 3 files changed, 12 insertions(+), 4 deletions(-) The commit log should mention changes to all the files you are changing. > +*** The function eshell/kill is now able to handle signal switches. > +Previously eshell/kill would fail if provided a kill signal to send to the > +process. It now handles both numeric signals and the string version of ^^ Two spaces between sentences, please. Also, I'd rephrase the last sentence: It now accepts signals specified either by name or by its number. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 17 17:20:41 2018 Received: (at 29156) by debbugs.gnu.org; 17 Mar 2018 21:20:41 +0000 Received: from localhost ([127.0.0.1]:38751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exJFo-0001WJ-VA for submit@debbugs.gnu.org; Sat, 17 Mar 2018 17:20:41 -0400 Received: from pagefault.se ([31.7.186.167]:33446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exJFm-0001WA-F6 for 29156@debbugs.gnu.org; Sat, 17 Mar 2018 17:20:39 -0400 Received: by pagefault.se (Postfix, from userid 5555) id 784809220105; Sat, 17 Mar 2018 21:20:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on pagefault.se X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from pagefault.se (c-460be255.07-19-73746f67.cust.bredbandsbolaget.se [85.226.11.70]) by pagefault.se (Postfix) with ESMTPSA id F0D7B9220101; Sat, 17 Mar 2018 21:20:36 +0000 (UTC) From: Eric Skoglund To: Eli Zaretskii , 29156@https: Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> <87zi3661j2.fsf@pagefault.se> <83a7v6pkdf.fsf@gnu.org> Date: Sat, 17 Mar 2018 22:20:34 +0100 In-Reply-To: <83a7v6pkdf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Mar 2018 21:33:48 +0200") Message-ID: <87muz65rh9.fsf@pagefault.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: 29156@debbugs.gnu.org, npostavs@gmail.com, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Two spaces between sentences, please. Also, I'd rephrase the last > sentence: > > It now accepts signals specified either by name or by its number. > > Thanks. Here'sthe latest patch, thanks for the patience! --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Make-eshell-kill-handle-signal-and-SIGNALNAME.patch Content-Description: Patch-v3 >From a02f03aa683afc3c1b41eaaaa8bf274a7727747f Mon Sep 17 00:00:00 2001 From: Eric Skoglund Date: Fri, 16 Mar 2018 14:49:56 +0100 Subject: [PATCH] Make eshell/kill handle - and - * lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing and numeric conversion in function in order to parse -signal and -SIGNALNAME correctly. * doc/misc/eshell.texi (kill): Update docs to reflect new function behaviour * etc/NEWS: Mention new eshell/kill behaviour --- doc/misc/eshell.texi | 2 +- etc/NEWS | 5 +++++ lisp/eshell/esh-proc.el | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 80077e5ccd..bda6159488 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -330,7 +330,7 @@ Built-ins @item kill @cmindex kill Kill processes. Takes a PID or a process object and an optional -signal specifier. +signal specifier which can either be a number or a signal name. @item listify @cmindex listify diff --git a/etc/NEWS b/etc/NEWS index b6c4157384..7df6eb4387 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -273,6 +273,11 @@ To restore the old behavior, use *** The function 'shell-uniquify-list' has been renamed from 'eshell-uniqify-list'. +*** The function eshell/kill is now able to handle signal switches. +Previously eshell/kill would fail if provided a kill signal to send to the +process. It now accepts signals specified either by name or by its number. + + ** Pcomplete *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index b3bd7a7245..1fe4b324a6 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -167,7 +167,8 @@ eshell/jobs (defun eshell/kill (&rest args) "Kill processes. Usage: kill [-] | ... -Accepts PIDs and process objects." +Accepts PIDs and process objects. Optionally accept signals +and signal names." ;; If the first argument starts with a dash, treat it as the signal ;; specifier. (let ((signum 'SIGINT)) @@ -178,12 +179,12 @@ eshell/kill ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) - (setq signum (abs (string-to-number arg))))) + (setq signum (intern (substring arg 1 (length arg)))))) (setq args (cdr args)))) (while args (let ((arg (if (eshell-processp (car args)) (process-id (car args)) - (car args)))) + (string-to-number (car args))))) (when arg (cond ((null arg) @@ -198,6 +199,8 @@ eshell/kill (setq args (cdr args)))) nil) +(put 'eshell/kill 'eshell-no-numeric-conversions t) + (defun eshell-read-process-name (prompt) "Read the name of a process from the minibuffer, using completion. The prompt will be set to PROMPT." -- 2.13.6 --=-=-= Content-Type: text/plain // Eric --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 22 21:05:42 2018 Received: (at 29156) by debbugs.gnu.org; 23 Mar 2018 01:05:42 +0000 Received: from localhost ([127.0.0.1]:48289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezB9J-0006uS-UC for submit@debbugs.gnu.org; Thu, 22 Mar 2018 21:05:42 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:52748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezB9J-0006uC-6y for 29156@debbugs.gnu.org; Thu, 22 Mar 2018 21:05:41 -0400 Received: by mail-it0-f49.google.com with SMTP id k135-v6so629286ite.2 for <29156@debbugs.gnu.org>; Thu, 22 Mar 2018 18:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=5uLbarcghPls9qQ3xLmtzqbIyTOWwIl9xY4rgqVqCC4=; b=gA+1GU8xCQBXzW0VaZWIIjnj/wXkZDU9OeQhcNY8sze00OHoxrTlyLAz3Lbm4zbesd sPe9pNnd2EPkMzIDY/mP1PqqtJmomjL6tldtK/lkU0fUBm4H1QBGrLDEHs/Wo4yDgKba jyXjSBtijrSr8u/2Lawjq5t5BavHBHQCsggbfGljW+WIXgw9vcZEf6GqPpz+baTtiJic j2Of/TAS4k+CsLvMiIHvLgwffqCpJ1GxQ4EeWDqripktiVRvjtlflh4JS8fV5FfrFwvJ tVQmG9ICodm2ukRktlu4fw5F/U6vxKd+FKsPIAw1uphtiPewAXGSbFgjiDTHYNAnV4eA QGOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=5uLbarcghPls9qQ3xLmtzqbIyTOWwIl9xY4rgqVqCC4=; b=TS/Z9jUnfZo/NHHUEH6nyDAKu+o+72lWYogvdKWFZLQ18+vFkMU1EmE5DkTorcmSC5 wc+68KONznYwxlYpCkLxn4RU2PB0hi1xeBMsCBq5WF+V3/EfspkPjKLrnI9oPynxBZ4v jb4kw9/T6NsAxrOtbaATgtw1X4+f8oL6RcGTTuv+b4IKeWHSp1AXTFJ89rf4GIPBnDF7 EVOn2p+m4SAxJWuZ5stDBNmL1T0XcGGAJWoXHVT7N/GDhOWyvDK0a4dF7FHgjHIqBtsJ YKBxR+Jt04FPGDpRpuy1Anbt3QxUQ2vu/0PAItgpMiegHfTCdxIlPsgQ9gM6fsosYsQ0 Yl+w== X-Gm-Message-State: AElRT7EKil8ek8fGU7r3R52ye7mLKnvQF4N+/hILRSsbNoYXLWdXilqD RCOI8SFGYPdu4pgZo17T+ag= X-Google-Smtp-Source: AG47ELvMA/vKdiqOgkhlUHY1jUcA9iKzn1alx0gFGMC8MCOaYSkBIBU/6etBQRk3gvkft2wKDLS4mA== X-Received: by 2002:a24:1a10:: with SMTP id 16-v6mr3559012iti.9.1521767135802; Thu, 22 Mar 2018 18:05:35 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id v2sm5295241iob.21.2018.03.22.18.05.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Mar 2018 18:05:34 -0700 (PDT) From: Noam Postavsky To: Eric Skoglund Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> <87zi3661j2.fsf@pagefault.se> <83a7v6pkdf.fsf@gnu.org> <87muz65rh9.fsf@pagefault.se> Date: Thu, 22 Mar 2018 21:05:33 -0400 In-Reply-To: <87muz65rh9.fsf@pagefault.se> (Eric Skoglund's message of "Sat, 17 Mar 2018 22:20:34 +0100") Message-ID: <877eq3sisi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Eli Zaretskii , 29156@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Thanks, do you have copyright assignment for Emacs? (the change is small enough to install regardless, I'm asking just to know if it should be marked as a tiny change). A couple more minor nitpicks: > * doc/misc/eshell.texi (kill): Update docs to reflect new > function behaviour > * etc/NEWS: Mention new eshell/kill behaviour Missing periods here. > + (setq signum (intern (substring arg 1 (length arg)))))) That could be just (substring arg 1) P.S. don't worry about the forwarding thing, it happens often enough that I've written an Emacs command to mostly automate it. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 23 02:04:00 2018 Received: (at 29156) by debbugs.gnu.org; 23 Mar 2018 06:04:00 +0000 Received: from localhost ([127.0.0.1]:48530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezFo0-0005oY-5r for submit@debbugs.gnu.org; Fri, 23 Mar 2018 02:04:00 -0400 Received: from pagefault.se ([31.7.186.167]:35298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezFny-0005oO-BT for 29156@debbugs.gnu.org; Fri, 23 Mar 2018 02:03:58 -0400 Received: by pagefault.se (Postfix, from userid 5555) id 714529220105; Fri, 23 Mar 2018 06:03:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on pagefault.se X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from pagefault.se (c-460be255.07-19-73746f67.cust.bredbandsbolaget.se [85.226.11.70]) by pagefault.se (Postfix) with ESMTPSA id BA6239220101; Fri, 23 Mar 2018 06:03:55 +0000 (UTC) From: Eric Skoglund To: Noam Postavsky Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - In-Reply-To: <877eq3sisi.fsf@gmail.com> References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> <87zi3661j2.fsf@pagefault.se> <83a7v6pkdf.fsf@gnu.org> <87muz65rh9.fsf@pagefault.se> <877eq3sisi.fsf@gmail.com> Date: Fri, 23 Mar 2018 07:03:55 +0100 Message-ID: <87d0zv5nw4.fsf@pagefault.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 29156 Cc: Eli Zaretskii , 29156@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Noam Postavsky writes: > Thanks, do you have copyright assignment for Emacs? (the change is small > enough to install regardless, I'm asking just to know if it should be > marked as a tiny change). Yes it was completed on 2016-12-05 when I had grand plans to contribute to emacs (maybe thoose plans can be fullfilled now :)). > > A couple more minor nitpicks: > >> * doc/misc/eshell.texi (kill): Update docs to reflect new >> function behaviour >> * etc/NEWS: Mention new eshell/kill behaviour > > Missing periods here. > >> + (setq signum (intern (substring arg 1 (length arg)))))) > > That could be just (substring arg 1) > Thanks! > P.S. don't worry about the forwarding thing, it happens often enough > that I've written an Emacs command to mostly automate it. Ah great :) Here is the latest patch version. Thanks for all the help for a first time contributor! --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Make-eshell-kill-handle-signal-and-SIGNALNAME.patch Content-Description: Patch v4 >From 7588028d623a8312a7a359f2be4ba84426d0619e Mon Sep 17 00:00:00 2001 From: Eric Skoglund Date: Fri, 16 Mar 2018 14:49:56 +0100 Subject: [PATCH] Make eshell/kill handle - and - * lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing and numeric conversion in function in order to parse -signal and -SIGNALNAME correctly. * doc/misc/eshell.texi (kill): Update docs to reflect new function behaviour. * etc/NEWS: Mention new eshell/kill behaviour. --- doc/misc/eshell.texi | 2 +- etc/NEWS | 5 +++++ lisp/eshell/esh-proc.el | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 80077e5ccd..bda6159488 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -330,7 +330,7 @@ Built-ins @item kill @cmindex kill Kill processes. Takes a PID or a process object and an optional -signal specifier. +signal specifier which can either be a number or a signal name. @item listify @cmindex listify diff --git a/etc/NEWS b/etc/NEWS index b6c4157384..7df6eb4387 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -273,6 +273,11 @@ To restore the old behavior, use *** The function 'shell-uniquify-list' has been renamed from 'eshell-uniqify-list'. +*** The function eshell/kill is now able to handle signal switches. +Previously eshell/kill would fail if provided a kill signal to send to the +process. It now accepts signals specified either by name or by its number. + + ** Pcomplete *** The function 'pcomplete-uniquify-list' has been renamed from 'pcomplete-uniqify-list'. diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index b3bd7a7245..a7855d81db 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -167,7 +167,8 @@ eshell/jobs (defun eshell/kill (&rest args) "Kill processes. Usage: kill [-] | ... -Accepts PIDs and process objects." +Accepts PIDs and process objects. Optionally accept signals +and signal names." ;; If the first argument starts with a dash, treat it as the signal ;; specifier. (let ((signum 'SIGINT)) @@ -178,12 +179,12 @@ eshell/kill ((string-match "\\`-[[:digit:]]+\\'" arg) (setq signum (abs (string-to-number arg)))) ((string-match "\\`-\\([[:upper:]]+\\|[[:lower:]]+\\)\\'" arg) - (setq signum (abs (string-to-number arg))))) + (setq signum (intern (substring arg 1))))) (setq args (cdr args)))) (while args (let ((arg (if (eshell-processp (car args)) (process-id (car args)) - (car args)))) + (string-to-number (car args))))) (when arg (cond ((null arg) @@ -198,6 +199,8 @@ eshell/kill (setq args (cdr args)))) nil) +(put 'eshell/kill 'eshell-no-numeric-conversions t) + (defun eshell-read-process-name (prompt) "Read the name of a process from the minibuffer, using completion. The prompt will be set to PROMPT." -- 2.13.6 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 11:34:43 2018 Received: (at 29156) by debbugs.gnu.org; 25 Mar 2018 15:34:43 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f07fP-0000Vn-9p for submit@debbugs.gnu.org; Sun, 25 Mar 2018 11:34:43 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:39451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f07fN-0000VV-Um; Sun, 25 Mar 2018 11:34:42 -0400 Received: by mail-it0-f54.google.com with SMTP id e98-v6so7793903itd.4; Sun, 25 Mar 2018 08:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nPRFqCmbHuhtuNsZlf2N8x21PF6Xr/gNEOwWw23b8rY=; b=GbuGdJNUvgHDCncMS/Pu8oIjJLyp9WAXBMFcs6N5s06zBL6WQvmRcoHPGdb/qrivh9 8wS6eDOwcB764ehkSJQNV4OlyEDYQkFcwqIeoAzyW2+p0DAdVp4Sd486lyJZn7IoaQs1 qtDmPewpBvSJumf1oa/FoFgygVkpD0KUqVuMeB006qDsquBDfcOui/8x4IcqOCjizSJb Jo9nlTG3saLJOCbs/9qR7Z+wtANyW3RIprDGmthizNm18hh3L555IwUXFc20FtsaE66L cQqZEeaw08+hvt18Ve6QHcDlJN+nwWKD4WH/qb3zzZ+sakSeYtn+j5OufGeGVasbqaKC MqOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=nPRFqCmbHuhtuNsZlf2N8x21PF6Xr/gNEOwWw23b8rY=; b=ZnPb0NvFyPI5RFSEWEiYKQvRMXmQy8B3dpqa+IJZTVz4yT/Itq1r4BNnpcDQ9EvWKh QS6OODNkpgTx0OQqSubyTNqyrr5EEfowvKdYa0dw9/1hVVxSeFWvBMlA0Gm1RLgEED+X GHvYuaip0i0pwRhyfv7cE5DYNQWqfEC+9BrRE8T3FNucfWc8BysaVqPqN0xZJOBkMoCo Oib3Ia7jvDGEWR6DU85XYqS1fdIu4SskIK02iVt7udCSa6QgMDfe63b+MZQ4p5PBCeRR OuQGtNIIEDSRiKkmueErr/ulnDxug4068NLSL2fJCMkPkO/z5fjbmRG9HetSpmFGMsQT ih1A== X-Gm-Message-State: AElRT7HdIo9TCgvGlbHQFk+hAEjwieIu6HQFuBNXRaHQsFFCoq//m5jV +mYZaZCBeDkbN4/b8EdswvrQ8Q== X-Google-Smtp-Source: AG47ELsVdxSYA83+u2QuaCUOC6Ld26PjQtsdOUwmJfIY12lGs5wuJ8nk4DQ03XIC2ImC2OasWJuUMA== X-Received: by 2002:a24:c941:: with SMTP id h62-v6mr20471775itg.153.1521992076459; Sun, 25 Mar 2018 08:34:36 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 12-v6sm9806372itm.0.2018.03.25.08.34.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Mar 2018 08:34:35 -0700 (PDT) From: Noam Postavsky To: Eric Skoglund Subject: Re: bug#29156: 25.3; eshell/kill does not understand -, [PATCH] Make eshell/kill handle - and - References: <87vaiprmg5.fsf@gmail.com> <87o9jnv9et.fsf@gmail.com> <87lgerv8tq.fsf@gmail.com> <83lgeroz7r.fsf@gnu.org> <87zi3661j2.fsf@pagefault.se> <83a7v6pkdf.fsf@gnu.org> <87muz65rh9.fsf@pagefault.se> <877eq3sisi.fsf@gmail.com> <87d0zv5nw4.fsf@pagefault.se> Date: Sun, 25 Mar 2018 11:34:34 -0400 In-Reply-To: <87d0zv5nw4.fsf@pagefault.se> (Eric Skoglund's message of "Fri, 23 Mar 2018 07:03:55 +0100") Message-ID: <87k1u0qid1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29156 Cc: Eli Zaretskii , 29156@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 29156 fixed close 29156 27.1 quit Eric Skoglund writes: > Noam Postavsky writes: > >> Thanks, do you have copyright assignment for Emacs? > Yes it was completed on 2016-12-05 when I had grand plans to contribute > to emacs (maybe thoose plans can be fullfilled now :)). Plans fullfilled :) [1: 1be6a21fd8] > Here is the latest patch version. Thanks for all the help for a first > time contributor! Thanks for your contribution! [1: 1be6a21fd8]: 2018-03-25 11:20:20 -0400 Make eshell/kill handle - and - (Bug#29156) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1be6a21fd8b5ade67f7f69f964331aa570623683 From unknown Tue Jun 24 05:14:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 23 Apr 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator