From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: How to call org-set-property from a function Date: Tue, 05 Jan 2016 23:27:19 +0100 Message-ID: <87bn8zmzlk.fsf@gmx.us> References: <87r3hv8yid.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGa4k-0002M0-Fw for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 17:27:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGa4h-0007Zw-9M for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 17:27:34 -0500 Received: from plane.gmane.org ([80.91.229.3]:60241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGa4h-0007Zq-2H for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 17:27:31 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aGa4c-0003Gg-8y for emacs-orgmode@gnu.org; Tue, 05 Jan 2016 23:27:26 +0100 Received: from x4db0e905.dyn.telefonica.de ([77.176.233.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2016 23:27:26 +0100 Received: from rasmus by x4db0e905.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2016 23:27:26 +0100 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Julien, Julien Cubizolles writes: > I have the following function to automate the creation of a new entry: > > #+begin_src emacs-lisp > (interactive) > (save-excursion > (org-beamer-select-environment) > (org-set-tags-command) > ) > #+end_src > > I'd like to add the possibility to set some properties through > (org-set-property) but I can't figure out how to call it in its > interactive way, so that it prompts me for a property and value ? Of > course adding (org-set-property) or (interactive (org-set-property)) > doesn't work. Does this do what you want: (call-interactively 'org-set-property) > Also, I will sometimes need to include several different > properties. What would be the right way to run a loop where a new > property is set until the user answers something like C-return at the > prompt ? Here's naive approach. Probably you can find a more elegant way. (condition-case nil (while t (call-interactively 'org-set-property)) (quit nil)) Rasmus -- Spil noget med Slayer!