From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add feature to org-drill to auto pronounce word Date: Sat, 26 Jan 2019 12:40:01 +0100 Message-ID: <87k1iry7e6.fsf@nicolasgoaziou.fr> References: <87r2dmmd8g.fsf@gmail.com> <87a7jqdtep.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnMJm-0000Pu-2Z for emacs-orgmode@gnu.org; Sat, 26 Jan 2019 06:40:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnMJl-0004uv-92 for emacs-orgmode@gnu.org; Sat, 26 Jan 2019 06:40:10 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:40965) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gnMJl-0004tb-0F for emacs-orgmode@gnu.org; Sat, 26 Jan 2019 06:40:09 -0500 In-Reply-To: <87a7jqdtep.fsf@gmail.com> (stardiviner's message of "Thu, 24 Jan 2019 22:25:34 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: stardiviner Cc: Paul Sexton , org-mode Hello, stardiviner writes: > A gentle ping.. I'm not sure "org-drill.el" is still actively maintained. I'm Cc'ing Paul Sexton. In the long run, I think this package could be packaged through ELPA instead. >> * etc/ORG-NEWS: mentioned this new feature. Changes to "contrib/" directory are usually not mentioned in this file. >> +(defun org-drill-pronounce-word () >> + "Pronounce word after querying." >> + (if org-drill-auto-pronounce >> + (shell-command-to-string >> + (format "%s %s %s &" >> + org-drill-pronounce-command org-drill-pronounce-command-args What are `org-drill-pronounce-command' and `org-drill-pronounce-command-args'? I don't see them defined anywhere. Also, please prefer `when' to one-armed `if'. >> + (shell-quote-argument >> + (substring-no-properties >> + (org-get-heading 'no-tags 'no-todo 'no-priority 'no-comment))))))) >> + >> +(add-hook 'org-drill-entry-after-hook #'org-drill-pronounce-word) Could it be more integrated? Using hook is usually for users. If you can modify the code, you probably can do better. Regards, -- Nicolas Goaziou