From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?=22=C9ibhear=22?= Subject: Bug: org-agenda-columns failing when Diary entries are included [9.0.5 (9.0.5-dist @ /home/ohanluaine/eibhear_org/lisp/org-9/lisp/)] Date: Thu, 27 Apr 2017 14:12:27 +0100 Message-ID: Reply-To: eibhear.geo@gmail.com Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3jDn-0001PJ-PL for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 09:12:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3jDk-000743-Fv for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 09:12:35 -0400 Received: from outbound-smtp07.blacknight.com ([46.22.139.12]:48682) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d3jDk-000739-58 for emacs-orgmode@gnu.org; Thu, 27 Apr 2017 09:12:32 -0400 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp07.blacknight.com (Postfix) with ESMTPS id 6F2C01C23AF for ; Thu, 27 Apr 2017 14:12:27 +0100 (IST) 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" To: emacs-orgmode@gnu.org Hi, I believe there's a bug in org-mode 9.0 when calling org-agenda-columns in an agenda view that includes items from the emacs diary file. To reproduce =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1. Setup: The following shell commands should build the test case. # a) Create a location for this test case: mkdir -vp ~/tmp/columns-bug # b) Create a simple org-mode file: cat << EOF > ~/tmp/columns-bug/columns-bug.org * TODOs ** TODO Eat your chocolate egg SCHEDULED: <2017-04-16 Sun 11:30> ** TODO Wish Michael a Happy Birthday SCHEDULED: <2017-03-17 Fri 10:00> EOF # c) Create a simple diary file: cat << EOF > ~/tmp/columns-bug/columns-bug.diary 17 March 2017 12:01 Afternoon is well and truly started EOF # d) Create a (not so) simple init file (this assumes that org # mode 9.0 is somewhere on the load-path): cat << EOF > ~/tmp/columns-bug/columns-bug.init (require 'appt) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(appt-disp-window-function 'appt-disp-window) '(appt-display-duration 60) '(appt-display-format (quote window)) '(appt-display-interval 5) '(appt-message-warning-time 15) '(calendar-date-style (quote european)) '(calendar-latitude 52.36) '(calendar-location-name "Dublin, Ireland") '(calendar-longitude -6.19) '(calendar-mark-diary-entries-flag t) '(calendar-time-display-form (quote (24-hours ":" minutes (if time-zone " (") time-zone (if time-zone ")"))) ) '(calendar-view-diary-initially-flag t) '(diary-file "~/tmp/columns-bug/columns-bug.diary") '(diary-hook (quote (appt-make-list))) '(diary-list-entries-hook (quote (diary-include-other-diary-files))) '(diary-list-include-blanks t) '(diary-number-of-entries 7) '(display-time-24hr-format t) '(org-agenda-files (quote ("~/tmp/columns-bug/columns-bug.org"))) '(org-agenda-include-diary t) '(org-finalize-agenda-hook (quote (org-agenda-to-appt))) '(org-sort-agenda-notime-is-late nil) ) (org-agenda-list nil "2017-03-17" 'day) EOF # e) Launch emacs: emacs -Q -l ~/tmp/columns-bug/columns-bug.init This will start emacs, calling columns-bug.init instead of .emacs, and will immediately show the org-agenda-list screen for the 17th March, 2017. There you'll see three entries: - St. Patrick's Day from "Diary". This is a calculated entry because diary-show-holidays-flag is t. - The "Wish Michael a Happy Birthday" TODO from the org-mode file above. - The "Afternoon is well and truly started" diary item from the diary file above. 2. Call org-agenda-columns interactively. Expected Result =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The columns overlay for the agenda should be presented. Actual Result =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The building of the columns view fails with the following report in the minibuffer: Wrong type argument: number-or-marker-p, nil Alternative scenario =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In the same org-agenda-list view, jump to 2017-04-16. This has two entries, "Easter Sunday" as a calculated diary entry and "Eat your chocolate egg" from the org-mode file. Calling org-agenda-columns succeeds. Discussion =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The error occurs in org-columns--displayed-value in org-colview.el because the call to org-current-level for a diary item from the diary file returns nil. The automatically-inserted information follows. Thanks, =C9ibhear Emacs : GNU Emacs 25.2.1 (x86_64-unknown-cygwin) of 2017-04-21 Package: Org mode version 9.0.5 (9.0.5-dist @ /home/ohanluaine/eibhear_org/lisp/org-9/lisp/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-sort-agenda-notime-is-late nil org-confirm-shell-link-function 'yes-or-no-p org-finalize-agenda-hook '(org-agenda-to-appt) org-agenda-include-diary t org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '((closure (org-inlinetask-min-level buffer-face-mode-face org-mode-map org-tbl-menu org-org-menu org-struct-menu org-entities 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-emphasis-alist org-emphasis-regexp-components org-export-registered-backends org-modules org-babel-load-languages t) nil (add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)) ) (closure (org-bracket-link-regexp org-src-window-setup *this* org-babel-confirm-evaluate-answer-no org-src-preserve-indentation org-src-lang-modes org-edit-src-content-indentation org-babel-library-of-babel t) nil (add-hook (quote change-major-mode-hook) (quote org-babel-show-result-all) (quote append) (quote local)) ) org-babel-result-hide-spec org-babel-hide-all-hashes) 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-finalize-hook '(org-agenda-to-appt) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) 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-agenda-files '("~/tmp/columns-bug/columns-bug.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) ) --=20 =C9ibhear =D3 hAnluain, Dublin, Ireland +-----------------------------+--------------------------------+ | e-mail: eibhear@gibiris.org | Web: [http://www.gibiris.org/] | | Twitter: @eibhear | Google+: +=C9ibhear =D3 hAnluain | | Mobile: +353 86 856 5666 | VoIP: sip:eibhear@linphone.org | +-----------------------------+--------------------------------+