From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org, larsi@gnus.org
Subject: Re: master ed84f24a21: Make `signal-process' allow completing over signal names
Date: Mon, 27 Jun 2022 14:36:13 +0300 [thread overview]
Message-ID: <83h7468hjm.fsf@gnu.org> (raw)
In-Reply-To: <87ilomewbp.fsf@yahoo.com> (message from Po Lu on Mon, 27 Jun 2022 09:20:26 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 27 Jun 2022 09:20:26 +0800
>
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> > +DEFUN ("signal-names", Fsignal_names, Ssignal_names, 0, 0, 0,
> > + doc: /* Return a list of known signal names on this system. */)
> > + (void)
> > +{
> > + char name[SIG2STR_MAX];
> > + Lisp_Object names = Qnil;
> > + for (int i = 0; i < 255; ++i)
> > + {
> > + if (!sig2str (i, name))
> > + {
> > + names = Fcons (build_string (name), names);
> > + }
> > + }
> > + return names;
> > +}
> > +
>
> Shouldn't the "255" be NSIG instead? And what about systems where POSIX
> signal handling doesn't really apply, such as MS Windows and MS-DOS?
I admit that I don't understand the purpose and the intended uses of
this new primitive. Is it there only for signal-process or more
generally for read-signal-name or even more generally for providing
the exhaustive list of names of all the signals known to the OS?
If it's only for signal-process, then is it really useful to produce a
completion table of 63 or 255 signal names, quite a few of which
cannot be usefully delivered to another process? Perhaps it would be
better to have a much shorter (system-dependent) list of signals that
can be delivered to processes on each system? IOW, if this is
supposed to be a convenience feature, then why not provide the user
with a convenient short list of signals that he/she would reasonably
consider delivering, and leave the rest to numbers?
next prev parent reply other threads:[~2022-06-27 11:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <165627647702.21409.11158107897633930882@vcs2.savannah.gnu.org>
[not found] ` <20220626204757.57AB1C01685@vcs2.savannah.gnu.org>
2022-06-27 1:20 ` master ed84f24a21: Make `signal-process' allow completing over signal names Po Lu
2022-06-27 6:37 ` Lars Ingebrigtsen
2022-06-27 6:51 ` Po Lu
2022-06-27 6:56 ` Lars Ingebrigtsen
2022-06-27 7:04 ` Po Lu
2022-06-27 7:10 ` Lars Ingebrigtsen
2022-06-27 8:10 ` Po Lu
2022-06-27 8:12 ` Lars Ingebrigtsen
2022-06-27 8:25 ` Po Lu
2022-06-27 8:47 ` Daniel Martín
2022-06-27 10:55 ` Lars Ingebrigtsen
2022-06-27 11:36 ` Eli Zaretskii [this message]
2022-06-28 11:23 ` Lars Ingebrigtsen
2022-06-28 13:19 ` Po Lu
2022-06-28 13:25 ` Lars Ingebrigtsen
2022-06-28 13:28 ` Po Lu
2022-06-28 13:32 ` Lars Ingebrigtsen
2022-06-28 13:34 ` Lars Ingebrigtsen
2022-06-28 13:35 ` Po Lu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h7468hjm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).