From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: [PATCH] Update both indicators: [/] and [%] Date: Sun, 21 Dec 2008 00:55:58 -0500 Message-ID: <8763lem5qp.fsf@gollum.intra.norang.ca> References: <87iqpesl75.fsf@jondo.cante.net> <275A94E5-0E4D-4583-8218-2C9F693DF673@uva.nl> <87ej02s65l.fsf@jondo.cante.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEHIO-0000Js-SF for emacs-orgmode@gnu.org; Sun, 21 Dec 2008 00:56:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEHIN-0000Jg-Bv for emacs-orgmode@gnu.org; Sun, 21 Dec 2008 00:56:07 -0500 Received: from [199.232.76.173] (port=34477 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEHIN-0000Jd-3x for emacs-orgmode@gnu.org; Sun, 21 Dec 2008 00:56:07 -0500 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:64839) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEHIM-0003xZ-P1 for emacs-orgmode@gnu.org; Sun, 21 Dec 2008 00:56:06 -0500 In-Reply-To: <87ej02s65l.fsf@jondo.cante.net> (Jari Aalto's message of "Sun\, 21 Dec 2008 02\:50\:30 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jari Aalto Cc: emacs-orgmode@gnu.org That would be because you are using the http: protocol which is fairly dumb. You end up transferring everything even if you don't need it. Setting up a repo that uses the git:// protocol is more efficient on network bandwidth. -Bernt Jari Aalto writes: > Carsten Dominik writes: > >> Hi Jari, >> >> if I try to fetch from your repo, git download in excess o 10MB, so >> something must be wrong here. Can you please post a patch? >> > > Hm, the repo is copy of yours. I'll see it later. > > Jari > > From 9f64abd92bad42d7b8e0f5e6cfe61e88e18c907c Mon Sep 17 00:00:00 2001 > From: Jari Aalto > Date: Sun, 21 Dec 2008 02:49:40 +0200 > Subject: [PATCH] org.el: (org-update-parent-todo-statistics): update both indicators > > Signed-off-by: Jari Aalto > --- > lisp/ChangeLog | 8 ++++++++ > lisp/org.el | 17 ++++++++++++----- > 2 files changed, 20 insertions(+), 5 deletions(-) > > diff --git a/lisp/ChangeLog b/lisp/ChangeLog > index bec5200..c38c4e5 100755 > --- a/lisp/ChangeLog > +++ b/lisp/ChangeLog > @@ -1,3 +1,11 @@ > +2008-12-20 Jari Aalto > + > + * org.el (org-update-parent-todo-statistics-1): New function. > + Accept argument RE to update paricular statistics. > + (org-update-parent-todo-statistics): Move functionality > + to `org-update-parent-todo-statistics-1'. Update both > + indicators: [/] and [%]. > + > 2008-12-20 Carsten Dominik > > * org.el (org-get-refile-targets, org-refile-get-location): Use > diff --git a/lisp/org.el b/lisp/org.el > index 2e2f953..d4b3c40 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -8304,10 +8304,9 @@ For calling through lisp, arg is also interpreted in the following way: > (save-excursion > (run-hook-with-args 'org-trigger-hook change-plist))))))) > > -(defun org-update-parent-todo-statistics () > - "Update any statistics cookie in the parent of the current headline." > - (interactive) > - (let ((box-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)") > +(defun org-update-parent-todo-statistics-1 (re) > + "Update statistics cookie matching RE in the parent of the current headline." > + (let ((box-re re) > level (cnt-all 0) (cnt-done 0) is-percent kwd) > (catch 'exit > (save-excursion > @@ -8315,7 +8314,8 @@ For calling through lisp, arg is also interpreted in the following way: > (unless (and level > (re-search-forward box-re (point-at-eol) t)) > (throw 'exit nil)) > - (setq is-percent (match-end 2)) > + (if (save-match-data (string-match "%" (match-string 0))) > + (setq is-percent t)) > (save-match-data > (unless (outline-next-heading) (throw 'exit nil)) > (while (looking-at org-todo-line-regexp) > @@ -8333,6 +8333,13 @@ For calling through lisp, arg is also interpreted in the following way: > (run-hook-with-args 'org-after-todo-statistics-hook > cnt-done (- cnt-all cnt-done)))))) > > +(defun org-update-parent-todo-statistics () > + "Update any statistics cookie in the parent of the current headline." > + (interactive) > + (dolist (re '("\\(\\[[0-9]*%\\]\\)" > + "\\(\\[[0-9]*/[0-9]*\\]\\)")) > + (org-update-parent-todo-statistics-1 re))) > + > (defvar org-after-todo-statistics-hook nil > "Hook that is called after a TODO statistics cookie has been updated. > Each function is called with two arguments: the number of not-done entries > -- > 1.6.0.2 > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode