all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-clock-select-task: how does it work?
Date: Wed, 28 Jan 2015 14:15:50 +0100	[thread overview]
Message-ID: <84r3ufhwqh.fsf@gmail.com> (raw)
In-Reply-To: 87mw53xhzq.fsf@gmail.com

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

  parent reply	other threads:[~2015-01-28 13:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24 13:57 org-clock-select-task: how does it work? Peter Münster
2015-01-24 15:08 ` Tory S. Anderson
2015-01-24 15:30   ` Peter Münster
2015-01-24 15:42     ` Tory S. Anderson
2015-01-24 19:35     ` Peter Münster
2015-01-24 20:15     ` Peter Münster
2015-01-27 10:00       ` Sebastien Vauban
2015-01-28 11:27         ` Tory S. Anderson
2015-01-28 12:52           ` Sebastien Vauban
2015-01-28 13:15           ` Marco Wahl [this message]
2015-01-28 13:26             ` Tory S. Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84r3ufhwqh.fsf@gmail.com \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.