From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eddward DeVilla Subject: Re: Re: checkbox statistics (fixed version) Date: Fri, 24 Apr 2009 14:48:20 -0500 Message-ID: References: <87iqky8erm.fsf@gmail.com> <6B91D94A-35ED-493C-B11F-538EE0F78EFF@gmail.com> <8763gu8atv.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LxRNr-00080e-Tm for emacs-orgmode@gnu.org; Fri, 24 Apr 2009 15:48:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LxRNn-0007xL-2U for emacs-orgmode@gnu.org; Fri, 24 Apr 2009 15:48:27 -0400 Received: from [199.232.76.173] (port=58772 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxRNm-0007xI-Vv for emacs-orgmode@gnu.org; Fri, 24 Apr 2009 15:48:23 -0400 Received: from mail-ew0-f162.google.com ([209.85.219.162]:60113) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LxRNm-0002lr-Fx for emacs-orgmode@gnu.org; Fri, 24 Apr 2009 15:48:22 -0400 Received: by ewy6 with SMTP id 6so1179175ewy.42 for ; Fri, 24 Apr 2009 12:48:20 -0700 (PDT) In-Reply-To: <8763gu8atv.fsf_-_@gmail.com> 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: Richard KLINDA Cc: emacs-orgmode@gnu.org I'll have to see if I can get this to work. I think I was one of the one that ask for the old behavior and have missed it ever since it was changed. Thanks! Edd On Fri, Apr 24, 2009 at 8:01 AM, Richard KLINDA wrote: > This is the fixed patch, it actually works on my real life org files so > this has a slight chance of being right. > >> ------------------------------------------------------------------------ > > diff --git a/lisp/org-list.el b/lisp/org-list.el > index 7469add..872dddf 100644 > --- a/lisp/org-list.el > +++ b/lisp/org-list.el > @@ -110,6 +110,9 @@ with \\[org-ctrl-c-ctrl-c\\]." > =A0 :group 'org-plain-lists > =A0 :type 'boolean) > > +(defcustom org-recursive-checkbox-statistics nil > + =A0"Non-nil means, that checkbox counting should happen recursively.") > + > =A0(defcustom org-description-max-indent 20 > =A0 "Maximum indentation for the second line of a description list. > =A0When the indentation would be larger than this, it will become > @@ -402,7 +405,10 @@ the whole buffer." > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (org-beginning-of-item) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq curr-ind (org-get-indentation)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq next-ind curr-ind) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0(while (and (bolp) (org-at-item-p) (=3D curr= -ind next-ind)) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(while (and (bolp) (org-at-item-p) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if org-recursiv= e-checkbox-statistics > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(<=3D cu= rr-ind next-ind) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(=3D cur= r-ind next-ind))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (save-excursion (end-of-line) (setq eline= (point))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if (re-search-forward re-box eline t) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (if (member (match-string 2) '("[= ]" "[-]")) > @@ -410,7 +416,12 @@ the whole buffer." > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq c-on (1+ c-on)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(org-end-of-item) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if org-recursive-checkbox-statistic= s > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(progn > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(end-of-line) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(when (re-search-forward= org-list-beginning-re lim t) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(beginning-of-line))= ) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(org-end-of-item)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq next-ind (org-get-indentation)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ))) > =A0 =A0 =A0 =A0 (goto-char continue-from) > >> ------------------------------------------------------------------------ > > -- > Richard > > > _______________________________________________ > 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 >