From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: Re: org-clock-select-task: how does it work? Date: Wed, 28 Jan 2015 08:26:45 -0500 Message-ID: <87a913xch6.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> <84r3ufhwqh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGSds-0002lo-EX for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:26:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGSdr-00054s-Ic for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:26:48 -0500 Received: from mail-yk0-x230.google.com ([2607:f8b0:4002:c07::230]:60365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGSdr-00054m-Dc for emacs-orgmode@gnu.org; Wed, 28 Jan 2015 08:26:47 -0500 Received: by mail-yk0-f176.google.com with SMTP id q200so8859567ykb.7 for ; Wed, 28 Jan 2015 05:26:47 -0800 (PST) In-Reply-To: <84r3ufhwqh.fsf@gmail.com> (Marco Wahl's message of "Wed, 28 Jan 2015 14:15:50 +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: Marco Wahl Cc: emacs-orgmode@gnu.org Excellent answers, on both fronts. Thanks! I couldn't spot `org-clock-history-length` in the code. That does the trick! Thanks for the answer about the "?A". It's devilishly hard to Google that kind of thing... time to RTM. Marco Wahl writes: > 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