all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: 29156@debbugs.gnu.org
Cc: Eric Skoglund <eric@pagefault.se>, Pierre Neidhardt <ambrevar@gmail.com>
Subject: bug#29156: 25.3; eshell/kill does not understand -<signal>, [PATCH] Make eshell/kill handle -<signal> and -<SIGNALNAME>
Date: Fri, 16 Mar 2018 20:34:25 -0400	[thread overview]
Message-ID: <87lgerv8tq.fsf@gmail.com> (raw)
In-Reply-To: <87o9jnv9et.fsf@gmail.com> (Noam Postavsky's message of "Fri, 16 Mar 2018 20:21:46 -0400")

> From: Eric Skoglund <eric@pagefault.se>

> 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 -<signal> and -<SIGNALNAME>

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)?





  reply	other threads:[~2018-03-17  0:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05 11:31 bug#29156: 25.3; eshell/kill does not understand -<signal> Pierre Neidhardt
2017-11-05 12:38 ` Noam Postavsky
2018-03-17  0:21 ` bug#29156: 25.3; eshell/kill does not understand -<signal>, [PATCH] Make eshell/kill handle -<signal> and -<SIGNALNAME> Noam Postavsky
2018-03-17  0:34   ` Noam Postavsky [this message]
2018-03-17  8:58     ` Eli Zaretskii
2018-03-17 17:43       ` Eric Skoglund
2018-03-17 19:33         ` Eli Zaretskii
     [not found]           ` <87muz65rh9.fsf@pagefault.se>
2018-03-23  1:05             ` Noam Postavsky
2018-03-23  6:03               ` Eric Skoglund
2018-03-25 15:34                 ` Noam Postavsky
2018-03-17 14:43 ` Noam Postavsky
2018-03-17 14:54   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgerv8tq.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=29156@debbugs.gnu.org \
    --cc=ambrevar@gmail.com \
    --cc=eric@pagefault.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.