From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: [bug] TODO [/] cookie not updating if list has inline task Date: Sun, 17 May 2015 12:22:23 +0100 Message-ID: <877fs75tzk.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtweX-0000vo-Ri for emacs-orgmode@gnu.org; Sun, 17 May 2015 07:22:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtweU-0002dn-Bh for emacs-orgmode@gnu.org; Sun, 17 May 2015 07:22:41 -0400 Received: from mail-db3on0110.outbound.protection.outlook.com ([157.55.234.110]:50050 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtweT-0002ac-Ut for emacs-orgmode@gnu.org; Sun, 17 May 2015 07:22:38 -0400 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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello, I often use checkbox lists for particular tasks. If any of the list items has an inline task (whether a task or not), the updating of the [/] cookie in the headline does not work. Attached is an example. Backtrace is also attached. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069 --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename="examplebug.org" #+TITLE: examplebug.org #+AUTHOR: Eric S Fraga #+options: tex:dvipng * TODO [0/2] to do cookies not updating - [ ] the first task *************** This is something to note *************** END - [ ] another list of tasks --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename="backtrace.txt" Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (error "Invalid search bound (wrong side of p= oint)") re-search-forward("^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ ]+\\= (?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ ]*\\)?\\(\\[[- X]\\]\\)"= 141 move) funcall(re-search-forward "^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\= )[ ]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ ]*\\)?\\(\\[[- X= ]\\]\\)" 141 move) (if (funcall search re bound noerr) nil (throw (quote exit) (and (goto-ch= ar (if (memq noerr (quote (t nil))) origin bound)) nil))) (while t (if (funcall search re bound noerr) nil (throw (quote exit) (and= (goto-char (if (memq noerr (quote ...)) origin bound)) nil))) (if (org-lis= t-in-valid-context-p) (progn (throw (quote exit) (point))))) (let ((origin (point))) (while t (if (funcall search re bound noerr) nil = (throw (quote exit) (and (goto-char (if (memq noerr ...) origin bound)) nil= ))) (if (org-list-in-valid-context-p) (progn (throw (quote exit) (point))))= )) (catch (quote exit) (let ((origin (point))) (while t (if (funcall search = re bound noerr) nil (throw (quote exit) (and (goto-char (if ... origin boun= d)) nil))) (if (org-list-in-valid-context-p) (progn (throw (quote exit) (po= int))))))) org-list-search-generic(re-search-forward "^[ ]*\\([-+*]\\|\\([0-9]+\\|[= A-Za-z]\\)[.)]\\)[ ]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ = ]*\\)?\\(\\[[- X]\\]\\)" 141 move) org-list-search-forward("^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[= ]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ ]*\\)?\\(\\[[- X]\= \]\\)" 141 move) (while (org-list-search-forward box-re backup-end (quote move)) (let* ((s= truct (org-list-struct)) (bottom (org-list-get-bottom-point struct))) (setq= structs-bak (cons struct structs-bak)) (goto-char bottom))) (cond ((and (org-at-heading-p) (string-match "\\" (downcase (or (= org-entry-get nil "COOKIE_DATA") "")))) (throw (quote skip) nil)) ((and (or= g-at-heading-p) (<=3D (save-excursion (outline-next-heading) (point)) backu= p-end)) (funcall count-boxes nil structs-bak recursivep)) ((org-at-heading-= p) (setq backup-end (save-excursion (outline-next-heading) (point)) structs= -bak nil) (while (org-list-search-forward box-re backup-end (quote move)) (= let* ((struct (org-list-struct)) (bottom (org-list-get-bottom-point struct)= )) (setq structs-bak (cons struct structs-bak)) (goto-char bottom))) (funca= ll count-boxes nil structs-bak recursivep)) ((and (org-at-item-p) (< (point= -at-bol) backup-end) (not (nth 2 (org-list-context)))) (funcall count-boxes= (point-at-bol) structs-bak recursivep)) ((org-at-item-p) (let ((struct (or= g-list-struct))) (setq backup-end (org-list-get-bottom-point struct) struct= s-bak (list struct))) (funcall count-boxes (point-at-bol) structs-bak recur= sivep)) (t (throw (quote skip) nil))) (list (match-beginning 1) (match-end 1) (match-string 2) (cond ((and (org= -at-heading-p) (string-match "\\" (downcase (or (org-entry-get nil = "COOKIE_DATA") "")))) (throw (quote skip) nil)) ((and (org-at-heading-p) (<= =3D (save-excursion (outline-next-heading) (point)) backup-end)) (funcall c= ount-boxes nil structs-bak recursivep)) ((org-at-heading-p) (setq backup-en= d (save-excursion (outline-next-heading) (point)) structs-bak nil) (while (= org-list-search-forward box-re backup-end (quote move)) (let* ((struct (org= -list-struct)) (bottom (org-list-get-bottom-point struct))) (setq structs-b= ak (cons struct structs-bak)) (goto-char bottom))) (funcall count-boxes nil= structs-bak recursivep)) ((and (org-at-item-p) (< (point-at-bol) backup-en= d) (not (nth 2 (org-list-context)))) (funcall count-boxes (point-at-bol) st= ructs-bak recursivep)) ((org-at-item-p) (let ((struct (org-list-struct))) (= setq backup-end (org-list-get-bottom-point struct) structs-bak (list struct= ))) (funcall count-boxes (point-at-bol) structs-bak recursivep)) (t (throw = (quote skip) nil)))) (cons (list (match-beginning 1) (match-end 1) (match-string 2) (cond ((an= d (org-at-heading-p) (string-match "\\" (downcase (or ... "")))) (t= hrow (quote skip) nil)) ((and (org-at-heading-p) (<=3D (save-excursion (out= line-next-heading) (point)) backup-end)) (funcall count-boxes nil structs-b= ak recursivep)) ((org-at-heading-p) (setq backup-end (save-excursion (outli= ne-next-heading) (point)) structs-bak nil) (while (org-list-search-forward = box-re backup-end (quote move)) (let* ((struct ...) (bottom ...)) (setq str= ucts-bak (cons struct structs-bak)) (goto-char bottom))) (funcall count-box= es nil structs-bak recursivep)) ((and (org-at-item-p) (< (point-at-bol) bac= kup-end) (not (nth 2 (org-list-context)))) (funcall count-boxes (point-at-b= ol) structs-bak recursivep)) ((org-at-item-p) (let ((struct (org-list-struc= t))) (setq backup-end (org-list-get-bottom-point struct) structs-bak (list = struct))) (funcall count-boxes (point-at-bol) structs-bak recursivep)) (t (= throw (quote skip) nil)))) cookies-list) (setq cookies-list (cons (list (match-beginning 1) (match-end 1) (match-s= tring 2) (cond ((and (org-at-heading-p) (string-match "\\" (downcas= e ...))) (throw (quote skip) nil)) ((and (org-at-heading-p) (<=3D (save-exc= ursion ... ...) backup-end)) (funcall count-boxes nil structs-bak recursive= p)) ((org-at-heading-p) (setq backup-end (save-excursion (outline-next-head= ing) (point)) structs-bak nil) (while (org-list-search-forward box-re backu= p-end (quote move)) (let* (... ...) (setq structs-bak ...) (goto-char botto= m))) (funcall count-boxes nil structs-bak recursivep)) ((and (org-at-item-p= ) (< (point-at-bol) backup-end) (not (nth 2 ...))) (funcall count-boxes (po= int-at-bol) structs-bak recursivep)) ((org-at-item-p) (let ((struct ...)) (= setq backup-end (org-list-get-bottom-point struct) structs-bak (list struct= ))) (funcall count-boxes (point-at-bol) structs-bak recursivep)) (t (throw = (quote skip) nil)))) cookies-list)) (save-excursion (setq cookies-list (cons (list (match-beginning 1) (match= -end 1) (match-string 2) (cond ((and (org-at-heading-p) (string-match "\\" ...)) (throw (quote skip) nil)) ((and (org-at-heading-p) (<=3D ... = backup-end)) (funcall count-boxes nil structs-bak recursivep)) ((org-at-hea= ding-p) (setq backup-end (save-excursion ... ...) structs-bak nil) (while (= org-list-search-forward box-re backup-end ...) (let* ... ... ...)) (funcall= count-boxes nil structs-bak recursivep)) ((and (org-at-item-p) (< ... back= up-end) (not ...)) (funcall count-boxes (point-at-bol) structs-bak recursiv= ep)) ((org-at-item-p) (let (...) (setq backup-end ... structs-bak ...)) (fu= ncall count-boxes (point-at-bol) structs-bak recursivep)) (t (throw (quote = skip) nil)))) cookies-list))) (catch (quote skip) (save-excursion (setq cookies-list (cons (list (match= -beginning 1) (match-end 1) (match-string 2) (cond ((and ... ...) (throw ..= . nil)) ((and ... ...) (funcall count-boxes nil structs-bak recursivep)) ((= org-at-heading-p) (setq backup-end ... structs-bak nil) (while ... ...) (fu= ncall count-boxes nil structs-bak recursivep)) ((and ... ... ...) (funcall = count-boxes ... structs-bak recursivep)) ((org-at-item-p) (let ... ...) (fu= ncall count-boxes ... structs-bak recursivep)) (t (throw ... nil)))) cookie= s-list)))) (while (re-search-forward cookie-re (cdr bounds) t) (catch (quote skip) (= save-excursion (setq cookies-list (cons (list (match-beginning 1) (match-en= d 1) (match-string 2) (cond (... ...) (... ...) (... ... ... ...) (... ...)= (... ... ...) (t ...))) cookies-list))))) (let ((cookie-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)")= (box-re "^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ ]+\\(?:\\[@\\(?= :start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ ]*\\)?\\(\\[[- X]\\]\\)") (recursiv= ep (or (not org-checkbox-hierarchical-statistics) (string-match "\\" (or (org-entry-get nil "COOKIE_DATA") "")))) (bounds (if all (cons (= point-min) (point-max)) (cons (or (condition-case nil (progn ... ...) (erro= r nil)) (point-min)) (save-excursion (outline-next-heading) (point))))) (co= unt-boxes (function (lambda (item structs recursivep) (let ((c-on 0) (c-all= 0)) (mapc (function ...) structs) (cons c-on c-all))))) (backup-end 1) coo= kies-list structs-bak box-num) (goto-char (car bounds)) (while (re-search-f= orward cookie-re (cdr bounds) t) (catch (quote skip) (save-excursion (setq = cookies-list (cons (list (match-beginning 1) (match-end 1) (match-string 2)= (cond ... ... ... ... ... ...)) cookies-list))))) (mapc (function (lambda = (cookie) (let* ((beg (car cookie)) (end (nth 1 cookie)) (percentp (nth 2 co= okie)) (checked (car ...)) (total (cdr ...)) (new (if percentp ... ...))) (= goto-char beg) (insert new) (delete-region (point) (+ (point) (- end beg)))= (if org-auto-align-tags (progn (org-fix-tags-on-the-fly)))))) cookies-list= )) (save-excursion (let ((cookie-re "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[= 0-9]*\\]\\)\\)") (box-re "^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[ = ]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ ]*\\)?\\(\\[[- X]\\= ]\\)") (recursivep (or (not org-checkbox-hierarchical-statistics) (string-m= atch "\\" (or (org-entry-get nil "COOKIE_DATA") "")))) (bounds= (if all (cons (point-min) (point-max)) (cons (or (condition-case nil ... .= ..) (point-min)) (save-excursion (outline-next-heading) (point))))) (count-= boxes (function (lambda (item structs recursivep) (let (... ...) (mapc ... = structs) (cons c-on c-all))))) (backup-end 1) cookies-list structs-bak box-= num) (goto-char (car bounds)) (while (re-search-forward cookie-re (cdr boun= ds) t) (catch (quote skip) (save-excursion (setq cookies-list (cons (list .= .. ... ... ...) cookies-list))))) (mapc (function (lambda (cookie) (let* ((= beg ...) (end ...) (percentp ...) (checked ...) (total ...) (new ...)) (got= o-char beg) (insert new) (delete-region (point) (+ ... ...)) (if org-auto-a= lign-tags (progn ...))))) cookies-list))) org-update-checkbox-count() (if (and (save-excursion (re-search-forward "^[ ]*\\([-+*]\\|[0-9]+[.)]\= \) \\[[- X]\\]" end t)) (not (save-excursion (re-search-forward ":COOKIE_DA= TA:.*\\" end t)))) (org-update-checkbox-count) (if (and l2 (> l2 l1= )) (progn (goto-char end) (org-update-parent-todo-statistics)) (goto-char p= os) (beginning-of-line 1) (while (re-search-forward "\\(\\(\\[[0-9]*%\\]\\)= \\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)" (point-at-eol) t) (replace-match (if (matc= h-end 2) "[100%]" "[0/0]") t t)))) (if (not (org-at-heading-p)) (org-update-checkbox-count) (setq l1 (org-ou= tline-level)) (setq end (save-excursion (outline-next-heading) (if (org-at-= heading-p) (setq l2 (org-outline-level))) (point))) (if (and (save-excursio= n (re-search-forward "^[ ]*\\([-+*]\\|[0-9]+[.)]\\) \\[[- X]\\]" end t)) (= not (save-excursion (re-search-forward ":COOKIE_DATA:.*\\" end t)))= ) (org-update-checkbox-count) (if (and l2 (> l2 l1)) (progn (goto-char end)= (org-update-parent-todo-statistics)) (goto-char pos) (beginning-of-line 1)= (while (re-search-forward "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]= \\)\\)" (point-at-eol) t) (replace-match (if (match-end 2) "[100%]" "[0/0]"= ) t t))))) (let ((pos (point-marker)) end l1 l2) (condition-case nil (progn (org-bac= k-to-heading t)) (error nil)) (if (not (org-at-heading-p)) (org-update-chec= kbox-count) (setq l1 (org-outline-level)) (setq end (save-excursion (outlin= e-next-heading) (if (org-at-heading-p) (setq l2 (org-outline-level))) (poin= t))) (if (and (save-excursion (re-search-forward "^[ ]*\\([-+*]\\|[0-9]+[.= )]\\) \\[[- X]\\]" end t)) (not (save-excursion (re-search-forward ":COOKIE= _DATA:.*\\" end t)))) (org-update-checkbox-count) (if (and l2 (> l2= l1)) (progn (goto-char end) (org-update-parent-todo-statistics)) (goto-cha= r pos) (beginning-of-line 1) (while (re-search-forward "\\(\\(\\[[0-9]*%\\]= \\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)" (point-at-eol) t) (replace-match (if (m= atch-end 2) "[100%]" "[0/0]") t t))))) (goto-char pos) (move-marker pos nil= )) (if (not (org-at-heading-p)) (org-update-checkbox-count) (let ((pos (poin= t-marker)) end l1 l2) (condition-case nil (progn (org-back-to-heading t)) (= error nil)) (if (not (org-at-heading-p)) (org-update-checkbox-count) (setq = l1 (org-outline-level)) (setq end (save-excursion (outline-next-heading) (i= f (org-at-heading-p) (setq l2 (org-outline-level))) (point))) (if (and (sav= e-excursion (re-search-forward "^[ ]*\\([-+*]\\|[0-9]+[.)]\\) \\[[- X]\\]"= end t)) (not (save-excursion (re-search-forward ":COOKIE_DATA:.*\\= " end t)))) (org-update-checkbox-count) (if (and l2 (> l2 l1)) (progn (goto= -char end) (org-update-parent-todo-statistics)) (goto-char pos) (beginning-= of-line 1) (while (re-search-forward "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*= /[0-9]*\\]\\)\\)" (point-at-eol) t) (replace-match (if ... "[100%]" "[0/0]"= ) t t))))) (goto-char pos) (move-marker pos nil))) (if all (progn (org-update-checkbox-count (quote all)) (org-map-entries (= quote org-update-parent-todo-statistics))) (if (not (org-at-heading-p)) (or= g-update-checkbox-count) (let ((pos (point-marker)) end l1 l2) (condition-c= ase nil (progn (org-back-to-heading t)) (error nil)) (if (not (org-at-headi= ng-p)) (org-update-checkbox-count) (setq l1 (org-outline-level)) (setq end = (save-excursion (outline-next-heading) (if (org-at-heading-p) (setq l2 ...)= ) (point))) (if (and (save-excursion (re-search-forward "^[ ]*\\([-+*]\\|[= 0-9]+[.)]\\) \\[[- X]\\]" end t)) (not (save-excursion ...))) (org-update-c= heckbox-count) (if (and l2 (> l2 l1)) (progn (goto-char end) (org-update-pa= rent-todo-statistics)) (goto-char pos) (beginning-of-line 1) (while (re-sea= rch-forward "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)" ... t) = (replace-match ... t t))))) (goto-char pos) (move-marker pos nil)))) org-update-statistics-cookies(nil) funcall-interactively(org-update-statistics-cookies nil) call-interactively(org-update-statistics-cookies) (cond ((eql type (quote clock)) (org-clock-update-time-maybe)) ((eql type= (quote dynamic-block)) (save-excursion (goto-char (org-element-property :p= ost-affiliated context)) (org-update-dblock))) ((eql type (quote footnote-d= efinition)) (goto-char (org-element-property :post-affiliated context)) (ca= ll-interactively (quote org-footnote-action))) ((eql type (quote footnote-r= eference)) (call-interactively (quote org-footnote-action))) ((memql type (= quote (headline inlinetask))) (save-excursion (goto-char (org-element-prope= rty :begin context)) (call-interactively (quote org-set-tags)))) ((eql type= (quote item)) (let* ((box (org-element-property :checkbox context)) (struc= t (org-element-property :structure context)) (old-struct (copy-tree struct)= ) (parents (org-list-parents-alist struct)) (prevs (org-list-prevs-alist st= ruct)) (orderedp (org-not-nil (org-entry-get nil "ORDERED")))) (org-list-se= t-checkbox (org-element-property :begin context) struct (cond ((equal arg (= quote ...)) "[-]") ((and (not box) (equal arg ...)) "[ ]") ((or (not box) (= equal arg ...)) nil) ((eq box (quote on)) "[ ]") (t "[X]"))) (org-list-stru= ct-fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-lis= t-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (le= t ((block-item (org-list-struct-fix-box struct parents prevs orderedp))) (i= f (and box (equal struct old-struct)) (if (equal arg (quote ...)) (message = "Checkboxes already reset") (user-error "Cannot toggle this checkbox: %s" (= if ... "all subitems checked" "unchecked subitems"))) (org-list-struct-appl= y-struct struct old-struct) (org-update-checkbox-count-maybe)) (if block-it= em (progn (message "Checkboxes were removed due to empty box at line %d" (o= rg-current-line block-item))))))) ((eql type (quote keyword)) (let ((org-in= hibit-startup-visibility-stuff t) (org-startup-align-all-tables nil)) (if (= boundp (quote org-table-coordinate-overlays)) (progn (mapc (quote delete-ov= erlay) org-table-coordinate-overlays) (setq org-table-coordinate-overlays n= il))) (let ((--data (org-outline-overlay-data (quote use-markers))) --rtn) = (unwind-protect (progn (setq --rtn (progn ...)) (org-set-outline-overlay-da= ta --data)) (if (quote use-markers) (progn (mapc ... --data)))) --rtn)) (me= ssage "Local setup has been refreshed")) ((eql type (quote plain-list)) (le= t* ((begin (org-element-property :contents-begin context)) (beginm (move-ma= rker (make-marker) begin)) (struct (org-element-property :structure context= )) (old-struct (copy-tree struct)) (first-box (save-excursion (goto-char be= gin) (looking-at org-list-full-item-re) (match-string-no-properties 3))) (n= ew-box (cond ((equal arg ...) "[-]") ((equal arg ...) (if first-box nil "[ = ]")) ((equal first-box "[X]") "[ ]") (t "[X]")))) (cond (arg (mapc (functio= n (lambda ... ...)) (org-list-get-all-items begin struct (org-list-prevs-al= ist struct)))) ((and first-box (eq (point) begin)) (org-list-set-checkbox b= egin struct new-box))) (org-list-write-struct struct (org-list-parents-alis= t struct) old-struct) (org-update-checkbox-count-maybe) (save-excursion (go= to-char beginm) (org-list-send-list (quote maybe))))) ((memql type (quote (= property-drawer node-property))) (call-interactively (quote org-property-ac= tion))) ((memql type (quote (radio-target target))) (call-interactively (qu= ote org-update-radio-target-regexp))) ((eql type (quote statistics-cookie))= (call-interactively (quote org-update-statistics-cookies))) ((memql type (= quote (table table-cell table-row))) (if (eq (org-element-property :type co= ntext) (quote table\.el)) (message "Use C-c ' to edit table.el tables") (le= t ((org-enable-table-editor t)) (if (or (eq type (quote table)) (and (eq ty= pe ...) (=3D ... ...))) (save-excursion (if (org-at-TBLFM-p) (progn ... ...= ) (goto-char ...) (org-call-with-arg ... ...) (orgtbl-send-table ...))) (or= g-table-maybe-eval-formula) (cond (arg (call-interactively ...)) ((org-tabl= e-maybe-recalculate-line)) (t (org-table-align))))))) ((eql type (quote tim= estamp)) (org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-u= ntil-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can= do nothing useful at this location")))) (let* ((context (org-element-context)) (type (org-element-type context)))= (cond ((eql type (quote link)) (setq context (org-element-property :parent= context)) (setq type (org-element-type context))) ((memql type (quote (bol= d code entity export-snippet inline-babel-call inline-src-block italic late= x-fragment line-break macro strike-through subscript superscript underline = verbatim))) (setq context (org-element-lineage context (quote (radio-target= paragraph verse-block table-cell)))))) (if (eq type (quote paragraph)) (pr= ogn (let ((parent (org-element-property :parent context))) (if (and (eq (or= g-element-type parent) (quote item)) (=3D (line-beginning-position) (org-el= ement-property :begin parent))) (progn (setq context parent type (quote ite= m))))))) (cond ((eql type (quote clock)) (org-clock-update-time-maybe)) ((e= ql type (quote dynamic-block)) (save-excursion (goto-char (org-element-prop= erty :post-affiliated context)) (org-update-dblock))) ((eql type (quote foo= tnote-definition)) (goto-char (org-element-property :post-affiliated contex= t)) (call-interactively (quote org-footnote-action))) ((eql type (quote foo= tnote-reference)) (call-interactively (quote org-footnote-action))) ((memql= type (quote (headline inlinetask))) (save-excursion (goto-char (org-elemen= t-property :begin context)) (call-interactively (quote org-set-tags)))) ((e= ql type (quote item)) (let* ((box (org-element-property :checkbox context))= (struct (org-element-property :structure context)) (old-struct (copy-tree = struct)) (parents (org-list-parents-alist struct)) (prevs (org-list-prevs-a= list struct)) (orderedp (org-not-nil (org-entry-get nil "ORDERED")))) (org-= list-set-checkbox (org-element-property :begin context) struct (cond ((equa= l arg ...) "[-]") ((and ... ...) "[ ]") ((or ... ...) nil) ((eq box ...) "[= ]") (t "[X]"))) (org-list-struct-fix-ind struct parents 2) (org-list-struc= t-fix-item-end struct) (org-list-struct-fix-bul struct prevs) (org-list-str= uct-fix-ind struct parents) (let ((block-item (org-list-struct-fix-box stru= ct parents prevs orderedp))) (if (and box (equal struct old-struct)) (if (e= qual arg ...) (message "Checkboxes already reset") (user-error "Cannot togg= le this checkbox: %s" ...)) (org-list-struct-apply-struct struct old-struct= ) (org-update-checkbox-count-maybe)) (if block-item (progn (message "Checkb= oxes were removed due to empty box at line %d" ...)))))) ((eql type (quote = keyword)) (let ((org-inhibit-startup-visibility-stuff t) (org-startup-align= -all-tables nil)) (if (boundp (quote org-table-coordinate-overlays)) (progn= (mapc (quote delete-overlay) org-table-coordinate-overlays) (setq org-tabl= e-coordinate-overlays nil))) (let ((--data (org-outline-overlay-data ...)) = --rtn) (unwind-protect (progn (setq --rtn ...) (org-set-outline-overlay-dat= a --data)) (if (quote use-markers) (progn ...))) --rtn)) (message "Local se= tup has been refreshed")) ((eql type (quote plain-list)) (let* ((begin (org= -element-property :contents-begin context)) (beginm (move-marker (make-mark= er) begin)) (struct (org-element-property :structure context)) (old-struct = (copy-tree struct)) (first-box (save-excursion (goto-char begin) (looking-a= t org-list-full-item-re) (match-string-no-properties 3))) (new-box (cond (.= .. "[-]") (... ...) (... "[ ]") (t "[X]")))) (cond (arg (mapc (function ...= ) (org-list-get-all-items begin struct ...))) ((and first-box (eq ... begin= )) (org-list-set-checkbox begin struct new-box))) (org-list-write-struct st= ruct (org-list-parents-alist struct) old-struct) (org-update-checkbox-count= -maybe) (save-excursion (goto-char beginm) (org-list-send-list (quote maybe= ))))) ((memql type (quote (property-drawer node-property))) (call-interacti= vely (quote org-property-action))) ((memql type (quote (radio-target target= ))) (call-interactively (quote org-update-radio-target-regexp))) ((eql type= (quote statistics-cookie)) (call-interactively (quote org-update-statistic= s-cookies))) ((memql type (quote (table table-cell table-row))) (if (eq (or= g-element-property :type context) (quote table\.el)) (message "Use C-c ' to= edit table.el tables") (let ((org-enable-table-editor t)) (if (or (eq type= ...) (and ... ...)) (save-excursion (if ... ... ... ... ...)) (org-table-m= aybe-eval-formula) (cond (arg ...) (...) (t ...)))))) ((eql type (quote tim= estamp)) (org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-u= ntil-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can= do nothing useful at this location"))))) (if (save-excursion (beginning-of-line) (looking-at "[ ]*$")) (or (run-h= ook-with-args-until-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-err= or "C-c C-c can do nothing useful at this location")) (let* ((context (org-= element-context)) (type (org-element-type context))) (cond ((eql type (quot= e link)) (setq context (org-element-property :parent context)) (setq type (= org-element-type context))) ((memql type (quote (bold code entity export-sn= ippet inline-babel-call inline-src-block italic latex-fragment line-break m= acro strike-through subscript superscript underline verbatim))) (setq conte= xt (org-element-lineage context (quote (radio-target paragraph verse-block = table-cell)))))) (if (eq type (quote paragraph)) (progn (let ((parent (org-= element-property :parent context))) (if (and (eq ... ...) (=3D ... ...)) (p= rogn (setq context parent type ...)))))) (cond ((eql type (quote clock)) (o= rg-clock-update-time-maybe)) ((eql type (quote dynamic-block)) (save-excurs= ion (goto-char (org-element-property :post-affiliated context)) (org-update= -dblock))) ((eql type (quote footnote-definition)) (goto-char (org-element-= property :post-affiliated context)) (call-interactively (quote org-footnote= -action))) ((eql type (quote footnote-reference)) (call-interactively (quot= e org-footnote-action))) ((memql type (quote (headline inlinetask))) (save-= excursion (goto-char (org-element-property :begin context)) (call-interacti= vely (quote org-set-tags)))) ((eql type (quote item)) (let* ((box (org-elem= ent-property :checkbox context)) (struct (org-element-property :structure c= ontext)) (old-struct (copy-tree struct)) (parents (org-list-parents-alist s= truct)) (prevs (org-list-prevs-alist struct)) (orderedp (org-not-nil ...)))= (org-list-set-checkbox (org-element-property :begin context) struct (cond = (... "[-]") (... "[ ]") (... nil) (... "[ ]") (t "[X]"))) (org-list-struct-= fix-ind struct parents 2) (org-list-struct-fix-item-end struct) (org-list-s= truct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let (= (block-item ...)) (if (and box ...) (if ... ... ...) (org-list-struct-apply= -struct struct old-struct) (org-update-checkbox-count-maybe)) (if block-ite= m (progn ...))))) ((eql type (quote keyword)) (let ((org-inhibit-startup-vi= sibility-stuff t) (org-startup-align-all-tables nil)) (if (boundp (quote or= g-table-coordinate-overlays)) (progn (mapc ... org-table-coordinate-overlay= s) (setq org-table-coordinate-overlays nil))) (let ((--data ...) --rtn) (un= wind-protect (progn ... ...) (if ... ...)) --rtn)) (message "Local setup ha= s been refreshed")) ((eql type (quote plain-list)) (let* ((begin (org-eleme= nt-property :contents-begin context)) (beginm (move-marker ... begin)) (str= uct (org-element-property :structure context)) (old-struct (copy-tree struc= t)) (first-box (save-excursion ... ... ...)) (new-box (cond ... ... ... ...= ))) (cond (arg (mapc ... ...)) ((and first-box ...) (org-list-set-checkbox = begin struct new-box))) (org-list-write-struct struct (org-list-parents-ali= st struct) old-struct) (org-update-checkbox-count-maybe) (save-excursion (g= oto-char beginm) (org-list-send-list (quote maybe))))) ((memql type (quote = (property-drawer node-property))) (call-interactively (quote org-property-a= ction))) ((memql type (quote (radio-target target))) (call-interactively (q= uote org-update-radio-target-regexp))) ((eql type (quote statistics-cookie)= ) (call-interactively (quote org-update-statistics-cookies))) ((memql type = (quote (table table-cell table-row))) (if (eq (org-element-property :type c= ontext) (quote table\.el)) (message "Use C-c ' to edit table.el tables") (l= et ((org-enable-table-editor t)) (if (or ... ...) (save-excursion ...) (org= -table-maybe-eval-formula) (cond ... ... ...))))) ((eql type (quote timesta= mp)) (org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-until= -success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can do = nothing useful at this location")))))) (cond ((or (and (boundp (quote org-clock-overlays)) org-clock-overlays) o= rg-occur-highlights) (and (boundp (quote org-clock-overlays)) (org-clock-re= move-overlays)) (org-remove-occur-highlights) (message "Temporary highlight= s/overlays removed from current buffer")) ((and (local-variable-p (quote or= g-finish-function) (current-buffer)) (fboundp org-finish-function)) (funcal= l org-finish-function)) ((run-hook-with-args-until-success (quote org-ctrl-= c-ctrl-c-hook))) (t (if (save-excursion (beginning-of-line) (looking-at "[ = ]*$")) (or (run-hook-with-args-until-success (quote org-ctrl-c-ctrl-c-fina= l-hook)) (user-error "C-c C-c can do nothing useful at this location")) (le= t* ((context (org-element-context)) (type (org-element-type context))) (con= d ((eql type (quote link)) (setq context (org-element-property :parent cont= ext)) (setq type (org-element-type context))) ((memql type (quote ...)) (se= tq context (org-element-lineage context ...)))) (if (eq type (quote paragra= ph)) (progn (let (...) (if ... ...)))) (cond ((eql type (quote clock)) (org= -clock-update-time-maybe)) ((eql type (quote dynamic-block)) (save-excursio= n (goto-char ...) (org-update-dblock))) ((eql type (quote footnote-definiti= on)) (goto-char (org-element-property :post-affiliated context)) (call-inte= ractively (quote org-footnote-action))) ((eql type (quote footnote-referenc= e)) (call-interactively (quote org-footnote-action))) ((memql type (quote .= ..)) (save-excursion (goto-char ...) (call-interactively ...))) ((eql type = (quote item)) (let* (... ... ... ... ... ...) (org-list-set-checkbox ... st= ruct ...) (org-list-struct-fix-ind struct parents 2) (org-list-struct-fix-i= tem-end struct) (org-list-struct-fix-bul struct prevs) (org-list-struct-fix= -ind struct parents) (let ... ... ...))) ((eql type (quote keyword)) (let (= ... ...) (if ... ...) (let ... ... --rtn)) (message "Local setup has been r= efreshed")) ((eql type (quote plain-list)) (let* (... ... ... ... ... ...) = (cond ... ...) (org-list-write-struct struct ... old-struct) (org-update-ch= eckbox-count-maybe) (save-excursion ... ...))) ((memql type (quote ...)) (c= all-interactively (quote org-property-action))) ((memql type (quote ...)) (= call-interactively (quote org-update-radio-target-regexp))) ((eql type (quo= te statistics-cookie)) (call-interactively (quote org-update-statistics-coo= kies))) ((memql type (quote ...)) (if (eq ... ...) (message "Use C-c ' to e= dit table.el tables") (let ... ...))) ((eql type (quote timestamp)) (org-ti= mestamp-change 0 (quote day))) (t (or (run-hook-with-args-until-success ...= ) (user-error "C-c C-c can do nothing useful at this location")))))))) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) --=-=-=--