From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julius Dittmar Subject: coding help needed: set, increase and log review priority Date: Wed, 2 May 2018 11:26:59 +0200 Message-ID: <696e1993-b53a-31f4-7ae5-d4a24ff5dc1d@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDo2T-0004hH-Np for emacs-orgmode@gnu.org; Wed, 02 May 2018 05:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDo2Q-0007DU-IU for emacs-orgmode@gnu.org; Wed, 02 May 2018 05:27:05 -0400 Received: from mout.gmx.net ([212.227.15.19]:49319) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDo2Q-0007Cp-7o for emacs-orgmode@gnu.org; Wed, 02 May 2018 05:27:02 -0400 Received: from [192.168.175.209] ([87.139.53.30]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LnPGI-1eiLRV3jGY-00hgQr for ; Wed, 02 May 2018 11:26:59 +0200 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: Org Mode Hi, lisp is still a mystery to me, so I need help coding some functions I would like to use. What I want is a property 'ReviewPriority', which can take integer values, and a property 'LastReview'. I need functions that - increase ReviewPriority by one, assuming an initial 0 if there's no value set, up to a hard-coded maximum of 5, set LastReview to the current date, and log the change (new value and date are sufficient) in the LOGBOOK drawer - set ReviewPriority to a fixed value (for example 1), set LastReview to the current date, and log the change in the LOGBOOK drawer - set ReviewPriority to a user-given value (clipping to the acceptable value range of 0 to 5 would be a boon, but is not necessary), set LastReview to the current date, and log the change in the LOGBOOK drawer. Additionally I'd like to bind the increase function to C-c r and the function with user input to C-c R. Any help welcome! Thanks in advance, Julius