emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Bug: org-agenda-columns failing when Diary entries are included [9.0


From: Éibhear
Subject: [O] 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
User-agent: SquirrelMail/1.4.22

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
============
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
===============
The columns overlay for the agenda should be presented.


Actual Result
=============
The building of the columns view fails with the following report in
the minibuffer:

Wrong type argument: number-or-marker-p, nil


Alternative scenario
====================

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
==========

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,

Éibhear


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:
==============
(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)
 )



-- 
Éibhear Ó hAnluain,
Dublin, Ireland
+-----------------------------+--------------------------------+
| e-mail: address@hidden | Web: [http://www.gibiris.org/] |
| Twitter: @eibhear           | Google+: +Éibhear Ó hAnluain   |
| Mobile: +353 86 856 5666    | VoIP: sip:address@hidden |
+-----------------------------+--------------------------------+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]