From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: org-clock-select-task: how does it work? Date: Wed, 28 Jan 2015 14:15:50 +0100 Message-ID: <84r3ufhwqh.fsf@gmail.com> References: <87wq4cnuwh.fsf@free.fr> <874mrgjjwq.fsf@gmail.com> <87wq4cdwm9.fsf@roche-blanche.net> <87bnlo7x6a.fsf@roche-blanche.net> <86oapkmtkq.fsf@example.com> <87mw53xhzq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGSTb-0004vr-Ib for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:16:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGSTX-0000dy-CW for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:16:11 -0500 Received: from plane.gmane.org ([80.91.229.3]:54351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGSTX-0000ds-6U for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:16:07 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YGSTU-0005Iv-41 for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 14:16:04 +0100 Received: from stgt-5f702d44.pool.mediaways.net ([95.112.45.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jan 2015 14:16:04 +0100 Received: from marcowahlsoft by stgt-5f702d44.pool.mediaways.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jan 2015 14:16:04 +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! torys.anderson@gmail.com (Tory S. Anderson) writes: > 2) As Peter originally mentioned, I see only five tasks on the list; I > have more than that each week. Can this be expanded with some > variable? AFAICS this is variable org-clock-history-length. > Having looked into problem 2 by going to `org-clock-select-task` in > 'org-clock.el', I found the following which is mostly beyond my > current elisp capabilities: > > (insert (org-add-props "Recent Tasks\n" nil 'face 'bold)) > (mapc > (lambda (m) > (when (marker-buffer m) > (setq i (1+ i) > s (org-clock-insert-selection-line > (if (< i 10) > (+ i ?0) > (+ i (- ?A 10))) m)) > (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s)))) > (push s sel-list))) > och) > > While I'd love it if someone could explain to me what the "?" operator > means with "?0" and "?A", one thing I get out of this is that a list > length of something less than 10 seems hardcoded (right?). What would > it take to be able customize this with a variable? ?0 is the integer representing character "0" see (info "(elisp)Basic Char Syntax"). The above is a possibility to map the numbers 0, 1,..., 9, 10, ... onto the characters '1', '2', ..., 'A', 'B', .... AFAICS. The letters should come into play when you have more than 9 items in the clock-history. HTH, Marco -- http://www.wahlzone.de GPG: 0x49010A040A3AE6F2