From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: stardiviner <numbchild@gmail.com>
Cc: Paul Sexton <eeeickythump@gmail.com>, org-mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Add feature to org-drill to auto pronounce word
Date: Wed, 30 Jan 2019 22:59:13 +0100 [thread overview]
Message-ID: <87munherim.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87h8drkaql.fsf@gmail.com> (stardiviner's message of "Tue, 29 Jan 2019 18:40:34 +0800")
Hello,
stardiviner <numbchild@gmail.com> writes:
> Oh, sorry, seems yes.
OK. A couple of comments if you don't mind.
> +(defcustom org-drill-pronounce-command ""
> + "Org-drill pronounce command."
> + :type 'string
> + :safe #'stringp
> + :group 'org-drill)
This is clearly not a safe command. You can remove the :safe keyword, or
put :safe nil
> +(defun org-drill-pronounce-word ()
> + "Pronounce word after querying."
> + (when org-drill-auto-pronounce
> + (shell-command-to-string
> + (format "%s %s %s &"
> + org-drill-pronounce-command org-drill-pronounce-command-args
> + (shell-quote-argument
> + (substring-no-properties
> + (org-get-heading 'no-tags 'no-todo 'no-priority 'no-comment)))))))
Is there any reason to use `shell-command-to-string'? You don't seem to
need the returned string anyway. Why not calling `start-process', or at
least `async-shell-command'?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2019-01-30 21:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 8:44 [PATCH] Add feature to org-drill to auto pronounce word stardiviner
2019-01-24 14:25 ` stardiviner
2019-01-26 11:40 ` Nicolas Goaziou
2019-01-27 2:50 ` stardiviner
2019-01-27 21:15 ` Nicolas Goaziou
2019-01-29 10:40 ` stardiviner
2019-01-30 21:59 ` Nicolas Goaziou [this message]
2019-02-01 2:37 ` stardiviner
2019-02-01 12:07 ` Stig Brautaset
2019-02-03 13:52 ` Nicolas Goaziou
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87munherim.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=eeeickythump@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=numbchild@gmail.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/org-mode.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).