emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: error sorting outline items [9.0.10 (9.0.10-elpa @ c:/users/ian/.emacs.d/elpa/org-20170827/)]
@ 2017-08-27 21:48 Ian Garmaise
  2017-08-29 22:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Garmaise @ 2017-08-27 21:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 12455 bytes --]

Often (but not always) when I attempt to sort some headlines, the sort
fails, and the following error message occurs (usually same after
reloading org uncompiled)

Sorting entries...
eq: Symbol’s function definition is void: org-clocking-buffer

Here is the backtrace:

Debugger entered--Lisp error: (void-function org-clocking-buffer)
  (org-clocking-buffer)
  (eq (org-clocking-buffer) (current-buffer))
  (and (eq (org-clocking-buffer) (current-buffer)) (<= start
(marker-position org-clock-marker)) (>= end (marker-position
org-clock-marker)))
  (if (and (eq (org-clocking-buffer) (current-buffer)) (<= start
(marker-position org-clock-marker)) (>= end (marker-position
org-clock-marker))) (progn (let* ((modified (buffer-modified-p))
(buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t))
(unwind-protect (progn (put-text-property (1- org-clock-marker)
org-clock-marker :org-clock-marker-backup t)) (if modified nil
(restore-buffer-modified-p nil)))) t))
  (let ((restore-clock\? (if (and (eq (org-clocking-buffer)
(current-buffer)) (<= start (marker-position org-clock-marker)) (>= end
(marker-position org-clock-marker))) (progn (let* ((modified ...)
(buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t))
(unwind-protect (progn ...) (if modified nil ...))) t))) (dcst (downcase
sorting-type)) (case-fold-search nil) (now (current-time))) (sort-subr (/=
dcst sorting-type) (function (lambda nil (if (re-search-forward re nil t)
(goto-char (match-beginning 0)) (goto-char (point-max))))) (function
(lambda nil (let ((save-match-data-internal (match-data))) (unwind-protect
(progn (condition-case nil ... ...)) (set-match-data
save-match-data-internal (quote evaporate)))))) (function (lambda nil (cond
((= dcst 110) (if (looking-at org-complex-heading-regexp) (string-to-number
...) nil)) ((= dcst 97) (if (looking-at org-complex-heading-regexp)
(funcall case-func ...) nil)) ((= dcst 107) (or (get-text-property ...
:org-clock-minutes) 0)) ((= dcst 116) (let (...) (if ... ... ...))) ((=
dcst 99) (let (...) (if ... ... ...))) ((= dcst 115) (let (...) (if ... ...
...))) ((= dcst 100) (let (...) (if ... ... ...))) ((= dcst 112) (if
(re-search-forward org-priority-regexp ... t) (string-to-char ...)
org-default-priority)) ((= dcst 114) (or (org-entry-get nil property) ""))
((= dcst 111) (if (looking-at org-complex-heading-regexp) (progn ...))) ((=
dcst 102) (if getkey-func (progn ... ... tmp) (error "Invalid key function
`%s'" getkey-func))) (t (error "Invalid sorting type `%c'"
sorting-type))))) nil (cond ((= dcst 97) (quote string<)) ((= dcst 102) (or
compare-func (and interactive\? (org-read-function (concat "Function for
comparing keys " "(empty for default `sort-subr' predicate): ") (quote
allow-empty))))) ((member dcst (quote (112 116 115 100 99 107))) (quote
<)))) (if restore-clock\? (progn (move-marker org-clock-marker (1+
(next-single-property-change start :org-clock-marker-backup)))
(remove-text-properties (1- org-clock-marker) org-clock-marker (quote
(:org-clock-marker-backup t))))))
  (save-restriction (narrow-to-region start end) (let ((restore-clock\? (if
(and (eq (org-clocking-buffer) (current-buffer)) (<= start (marker-position
org-clock-marker)) (>= end (marker-position org-clock-marker))) (progn
(let* (... ... ... ...) (unwind-protect ... ...)) t))) (dcst (downcase
sorting-type)) (case-fold-search nil) (now (current-time))) (sort-subr (/=
dcst sorting-type) (function (lambda nil (if (re-search-forward re nil t)
(goto-char (match-beginning 0)) (goto-char (point-max))))) (function
(lambda nil (let ((save-match-data-internal ...)) (unwind-protect (progn
...) (set-match-data save-match-data-internal ...))))) (function (lambda
nil (cond ((= dcst 110) (if ... ... nil)) ((= dcst 97) (if ... ... nil))
((= dcst 107) (or ... 0)) ((= dcst 116) (let ... ...)) ((= dcst 99) (let
... ...)) ((= dcst 115) (let ... ...)) ((= dcst 100) (let ... ...)) ((=
dcst 112) (if ... ... org-default-priority)) ((= dcst 114) (or ... "")) ((=
dcst 111) (if ... ...)) ((= dcst 102) (if getkey-func ... ...)) (t (error
"Invalid sorting type `%c'" sorting-type))))) nil (cond ((= dcst 97) (quote
string<)) ((= dcst 102) (or compare-func (and interactive\?
(org-read-function ... ...)))) ((member dcst (quote (112 116 115 100 99
107))) (quote <)))) (if restore-clock\? (progn (move-marker
org-clock-marker (1+ (next-single-property-change start
:org-clock-marker-backup))) (remove-text-properties (1- org-clock-marker)
org-clock-marker (quote (:org-clock-marker-backup t)))))))
  (let ((case-func (if with-case (quote identity) (quote downcase))) start
beg end stars re re2 txt what tmp) (cond ((org-region-active-p) (setq end
(region-end) what "region") (goto-char (region-beginning)) (if
(org-at-heading-p) nil (outline-next-heading)) (setq start (point))) ((or
(org-at-heading-p) (condition-case nil (progn (progn (org-back-to-heading)
t)) (error nil))) (org-back-to-heading) (setq start (point) end (progn
(org-end-of-subtree t t) (or (bolp) (insert "\n")) (if (>=
(org-back-over-empty-lines) 1) (progn (forward-line 1))) (point)) what
"children") (goto-char start) (outline-show-subtree)
(outline-next-heading)) (t (goto-char (point-min)) (or (org-at-heading-p)
(outline-next-heading)) (setq start (point)) (goto-char (point-max))
(beginning-of-line 1) (if (looking-at ".*?\\S-") (progn (end-of-line 1)
(insert "\n"))) (setq end (point-max)) (setq what "top-level") (goto-char
start) (outline-show-all))) (setq beg (point)) (if (>= beg end) (progn
(goto-char start) (user-error "Nothing to sort"))) (looking-at
"\\(\\*+\\)") (setq stars (match-string 1) re (concat "^" (regexp-quote
stars) " +") re2 (concat "^" (regexp-quote (substring stars 0 -1)) "[ \n]")
txt (buffer-substring beg end)) (if (equal (substring txt -1) "\n") nil
(setq txt (concat txt "\n"))) (if (and (not (equal stars "*"))
(string-match re2 txt)) (progn (user-error "Region to sort contains a level
above the first entry"))) (if sorting-type nil (message "Sort %s: [a]lpha
 [n]umeric  [p]riority  p[r]operty  todo[o]rder  [f]unc\n
[t]ime [s]cheduled  [d]eadline  [c]reated  cloc[k]ing\n
A/N/P/R/O/F/T/S/D/C/K means reversed:" what) (setq sorting-type
(read-char-exclusive))) (if getkey-func nil (and (= (downcase sorting-type)
102) (setq getkey-func (or (and interactive\? (org-read-function "Function
for extracting keys: ")) (error "Missing key extractor"))))) (and (=
(downcase sorting-type) 114) (not property) (setq property (completing-read
"Property: " (mapcar (function list) (org-buffer-property-keys t)) nil t)))
(if (member sorting-type (quote (107 75))) (progn (org-clock-sum)))
(message "Sorting entries...") (save-restriction (narrow-to-region start
end) (let ((restore-clock\? (if (and (eq ... ...) (<= start ...) (>= end
...)) (progn (let* ... ...) t))) (dcst (downcase sorting-type))
(case-fold-search nil) (now (current-time))) (sort-subr (/= dcst
sorting-type) (function (lambda nil (if (re-search-forward re nil t)
(goto-char ...) (goto-char ...)))) (function (lambda nil (let (...)
(unwind-protect ... ...)))) (function (lambda nil (cond (... ...) (... ...)
(... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (...
...) (... ...) (t ...)))) nil (cond ((= dcst 97) (quote string<)) ((= dcst
102) (or compare-func (and interactive\? ...))) ((member dcst (quote ...))
(quote <)))) (if restore-clock\? (progn (move-marker org-clock-marker (1+
(next-single-property-change start :org-clock-marker-backup)))
(remove-text-properties (1- org-clock-marker) org-clock-marker (quote
(:org-clock-marker-backup t))))))) (run-hooks (quote
org-after-sorting-entries-or-items-hook)) (message "Sorting
entries...done"))
  org-sort-entries(nil nil nil nil nil t)
  funcall-interactively(org-sort-entries nil nil nil nil nil t)
  call-interactively(org-sort-entries)
  (let ((current-prefix-arg arg)) (call-interactively command))
  org-call-with-arg(org-sort-entries nil)
  (cond ((org-at-table-p) (org-call-with-arg (quote org-table-sort-lines)
with-case)) ((org-at-item-p) (org-call-with-arg (quote org-sort-list)
with-case)) (t (org-call-with-arg (quote org-sort-entries) with-case)))
  org-sort(nil)
  funcall-interactively(org-sort nil)
  call-interactively(org-sort nil nil)
  command-execute(org-sort)


Emacs  : GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-11-15
Package: Org mode version 9.0.10 (9.0.10-elpa @
c:/users/ian/.emacs.d/elpa/org-20170827/)

current state:
==============
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-link-parameters '(("id" :follow org-id-open)
 ("rmail" :follow org-rmail-open :store org-rmail-store-link)
 ("mhe" :follow org-mhe-open :store org-mhe-store-link)
 ("irc" :follow org-irc-visit :store org-irc-store-link)
 ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
 ("gnus" :follow org-gnus-open :store org-gnus-store-link)
 ("docview" :follow org-docview-open :export org-docview-export :store
org-docview-store-link)
 ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
 ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
 ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
 ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link)
 ("file" :complete org-file-complete-link)
 ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path))))
 ("help" :follow org--open-help-link)
 ("http" :follow (lambda (path) (browse-url (concat "http:" path))))
 ("https" :follow (lambda (path) (browse-url (concat "https:" path))))
 ("mailto" :follow (lambda (path) (browse-url (concat "mailto:" path))))
 ("message" :follow (lambda (path) (browse-url (concat "message:" path))))
 ("news" :follow (lambda (path) (browse-url (concat "news:" path))))
 ("shell" :follow org--open-shell-link))
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-log-done 'time
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-tag-alist '(("@work" . 119) ("@home" . 104) ("laptop" . 108))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '((closure
(org-inlinetask-min-level buffer-face-mode-face org-struct-menu
org-last-state
org-id-track-globally org-clock-start-time texmathp-why remember-data-file
org-agenda-tags-todo-honor-ignore-options iswitchb-temp-buflist
calc-embedded-open-mode calc-embedded-open-formula
calc-embedded-close-formula
align-mode-rules-list org-export-registered-backends t)
nil
(add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote
append)
(quote local))
)
 (closure (*this* org-babel-confirm-evaluate-answer-no t) nil
(add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all)
(quote append) (quote local))
)
 #[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-block-all append local] 5]
 #[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))
 org-agenda-files '("~/Dropbox/org/orgtutorial.org" "~/Dropbox/org/test.org
")
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default) ("\\.xlsx\\'" . default))
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )


-- 
=====
Ian Garmaise
Consultant
Phorix Solutions Group
ian.g@phorixsol.com
Toronto cell: 416.432.2251
NYC: 917.512.9535

My linkedin profile <https://www.linkedin.com/in/igarmaise/>

http://www.PhorixSol.com

[-- Attachment #2: Type: text/html, Size: 22881 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: error sorting outline items [9.0.10 (9.0.10-elpa @ c:/users/ian/.emacs.d/elpa/org-20170827/)]
  2017-08-27 21:48 Bug: error sorting outline items [9.0.10 (9.0.10-elpa @ c:/users/ian/.emacs.d/elpa/org-20170827/)] Ian Garmaise
@ 2017-08-29 22:15 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-08-29 22:15 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

Hello,

Ian Garmaise <ian.g@phorixsol.com> writes:

> Often (but not always) when I attempt to sort some headlines, the sort
> fails, and the following error message occurs (usually same after
> reloading org uncompiled)
>
> Sorting entries...
> eq: Symbol’s function definition is void: org-clocking-buffer
>
> Here is the backtrace:
>
> Debugger entered--Lisp error: (void-function org-clocking-buffer)

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-29 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-27 21:48 Bug: error sorting outline items [9.0.10 (9.0.10-elpa @ c:/users/ian/.emacs.d/elpa/org-20170827/)] Ian Garmaise
2017-08-29 22:15 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).