From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: How about lifting the limit of 35 tasks in org-clock-history? Date: Fri, 31 Aug 2018 07:56:11 +0200 Message-ID: <87h8jbjczo.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvcQn-0002H2-JN for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 01:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvcQj-0002pm-Dv for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 01:57:17 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]:36845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvcQj-0002pK-3E for emacs-orgmode@gnu.org; Fri, 31 Aug 2018 01:57:13 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 9D8A0E6559 for ; Fri, 31 Aug 2018 07:57:10 +0200 (CEST) Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TbVbIudVPvxH for ; Fri, 31 Aug 2018 07:57:05 +0200 (CEST) Received: from localhost (188.47.48.111.ipv4.supernova.orange.pl [188.47.48.111]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 90925E6530 for ; Fri, 31 Aug 2018 07:57:05 +0200 (CEST) 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 mailing list --=-=-= Content-Type: text/plain Hi all, I attach a trivial patch fixing a very annoying cap on org-clock-history. (I want to set org-clock-history to 120.) Best, -- Marcin Borkowski http://mbork.pl --=-=-= Content-Type: text/x-patch; size=1.33KiB Content-Disposition: attachment; filename=0001-Lift-the-artificial-limit-on-the-clock-history-lengt.patch >From 10de3a12ebbad820fb86dc6924f17d701d4f9620 Mon Sep 17 00:00:00 2001 From: Marcin Borkowski Date: Fri, 31 Aug 2018 07:53:42 +0200 Subject: [PATCH] Lift the artificial limit on the clock history length. The default limit of 35 was hard-coded, and was especially annoying when using an alternative way of selecting from history, e.g. https://github.com/unhammer/org-mru-clock. --- lisp/org-clock.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 9819fcff2..370392947 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -156,7 +156,9 @@ state to switch it to." (symbol :tag "Function"))) (defcustom org-clock-history-length 5 - "Number of clock tasks to remember in history." + "Number of clock tasks to remember in history. +Clocking in using history may not work if this number is higher +than 35." :group 'org-clock :type 'integer) @@ -534,7 +536,7 @@ cannot be translated." (defun org-clock-history-push (&optional pos buffer) "Push a marker to the clock history." - (setq org-clock-history-length (max 1 (min 35 org-clock-history-length))) + (setq org-clock-history-length (max 1 org-clock-history-length)) (let ((m (move-marker (make-marker) (or pos (point)) (org-base-buffer (or buffer (current-buffer))))) -- 2.18.0 --=-=-=--