From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Regression in Org triggered from helm Date: Tue, 27 Oct 2015 20:22:42 +0000 Message-ID: <562FDD12.7000702@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqoIT-0000O4-C7 for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 16:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqoIQ-0002Qm-6j for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 16:23:13 -0400 Received: from mout.gmx.net ([212.227.15.19]:56308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqoIP-0002Qb-Sz for emacs-orgmode@gnu.org; Mon, 26 Oct 2015 16:23:10 -0400 Received: from [192.168.0.10] ([109.91.39.205]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LslCb-1aWq1N15K5-012HEX for ; Mon, 26 Oct 2015 21:23:08 +0100 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 Hi, after updating helm I came across a possible regression on Org. I Already filed a helm bug, but Thierry thinks it's Org's fault. https://github.com/emacs-helm/helm/issues/1246 In short, M-x helm-org-agenda-files-headings breaks. I had some success working around it, but for reasons beyond me that doesn't work any more. I'll try to work out a MCE but for the time in between, maybe someone has an idea what's wrong, and where (org or helm)? Here is the complete stacktrace (the -my function is textually equivalent to its non-my counterpart in helm-org): Debugger entered--Lisp error: (args-out-of-range "LoD" 0 -3) substring("LoD" 0 -6) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if (< (length h) maxwidth) (progn (setq total (+ total (length h) 1)) h) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ ]+\\'" h) (setq h (substring h 0 (match-beginning 0)))) (setq h (concat h ".."))) (lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 10000)) (setq maxwidth (- total-width total))) (if (< (length h) maxwidth) (progn (setq total (+ total (length h) 1)) h) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ ]+\\'" h) (setq h (substring h 0 (match-beginning 0)))) (setq h (concat h ".."))) (org-add-props h nil (quote face) (nth (% (1- n) org-n-level-faces) org-level-faces)) h)("LoD") mapconcat((lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 10000)) (setq maxwidth (- total-width total))) (if (< (length h) maxwidth) (progn (setq total (+ total (length h) 1)) h) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ ]+\\'" h) (setq h (substring h 0 (match-beginning 0)))) (setq h (concat h ".."))) (org-add-props h nil (quote face) (nth (% (1- n) org-n-level-faces) org-level-faces)) h) (#("CityServer3D" 0 12 (face org-level-1)) #("Archive" 0 7 (face org-level-2)) #("Portrayal" 0 9 (face org-level-3)) #("Konzeption" 0 10 (face org-level-4)) #("Symbolizer" 0 10 (face org-level-5)) "Einsatzgebiete" "LoD") "/") (concat prefix (if prefix (or separator "/")) (mapconcat (function (lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 10000)) (setq maxwidth (- total-width total))) (if (< (length h) maxwidth) (progn (setq total (+ total ... 1)) h) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ ]+\\'" h) (setq h (substring h 0 ...))) (setq h (concat h ".."))) (org-add-props h nil (quote face) (nth (% (1- n) org-n-level-faces) org-level-faces)) h)) path (or separator "/"))) (let* ((nsteps (length path)) (total-width (+ nsteps (apply (quote +) (mapcar (quote length) path)))) (maxwidth (if (<= total-width width) 10000 (/ (- width nsteps) nsteps))) (org-odd-levels-only nil) (n 0) (total (1+ (length prefix)))) (setq maxwidth (max maxwidth 10)) (concat prefix (if prefix (or separator "/")) (mapconcat (function (lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 10000)) (setq maxwidth (- total-width total))) (if (< (length h) maxwidth) (progn (setq total ...) h) (setq h (substring h 0 ...) total (+ total maxwidth 1)) (if (string-match "[ ]+\\'" h) (setq h ...)) (setq h (concat h ".."))) (org-add-props h nil (quote face) (nth (% ... org-n-level-faces) org-level-faces)) h)) path (or separator "/")))) (if (not path) (or prefix "") (let* ((nsteps (length path)) (total-width (+ nsteps (apply (quote +) (mapcar (quote length) path)))) (maxwidth (if (<= total-width width) 10000 (/ (- width nsteps) nsteps))) (org-odd-levels-only nil) (n 0) (total (1+ (length prefix)))) (setq maxwidth (max maxwidth 10)) (concat prefix (if prefix (or separator "/")) (mapconcat (function (lambda (h) (setq n (1+ n)) (if (and ... ...) (setq maxwidth ...)) (if (< ... maxwidth) (progn ... h) (setq h ... total ...) (if ... ...) (setq h ...)) (org-add-props h nil (quote face) (nth ... org-level-faces)) h)) path (or separator "/"))))) org-format-outline-path((#("CityServer3D" 0 12 (face org-level-1)) #("Archive" 0 7 (face org-level-2)) #("Portrayal" 0 9 (face org-level-3)) #("Konzeption" 0 10 (face org-level-4)) #("Symbolizer" 0 10 (face org-level-5)) "Einsatzgebiete" "LoD") 80 "projects.org:") helm-get-org-candidates-in-file("/home/simon/org/fraunhofer/projects.org" 1 8 nil nil) #[257 "\304\300\301\n %\207" [1 8 helm-org-headings-fontify helm-org-headings--nofilename helm-get-org-candidates-in-file] 7 "\n\n(fn FILENAME)"]("/home/simon/org/fraunhofer/projects.org") mapcar(#[257 "\304\300\301\n %\207" [1 8 helm-org-headings-fontify helm-org-headings--nofilename helm-get-org-candidates-in-file] 7 "\n\n(fn FILENAME)"] ("/home/simon/org/....org")) helm-org-get-candidates(("/home/simon/org/....org") 1 8) helm-source-org-headings-for-files(("/home/simon/org/....org")) helm-org-agenda-files-headings() call-interactively(helm-org-agenda-files-headings record nil) command-execute(helm-org-agenda-files-headings record) execute-extended-command(nil "helm-org-agenda-files-headings") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)