1

I'm trying to set up org-mobile, but I just get an error whenever I try to push:

Creating agendas...
Args out of range: 1, 1

I've tried both with a blank config and a config as below. EDIT5: Changing org-agenda-files to use quote rather than list doesn't remove the error message.

(setq org-directory "~/org")
(setq org-agenda-files (list "~/org/notes.org"
                            "~/org/todo.org"
                            "~/org/work.org"))

(setq org-mobile-inbox-for-pull "~/org/inbox.org")
(setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")

(setq org-capture-templates
      '(("t" "Todo" entry (file+headline "~/org/todo.org" "Tasks")
        "* TODO %?\n  %i\n  %a")
        ("w" "Work" entry (file+datetree "~/org/work.org")
        "* %?\nEntered on %U\n  %i\n  %a")
        ("n" "Notes" entry (file+datetree "~/org/notes.org")
        "* %?\nEntered on %U\n  %i\n  %a")
        ))

I've tried both with empty org files and my filled org files, but I get the same error anyhow.

I have zero elisp skills, so I'm not even sure how I can start debugging this issue or get a stack-trace to see where the bug happens.

Any idea what I might be doing wrong?

EDIT: I think I managed to get a backtrace, but this looks like black magic. EDIT2: I have removed a lot of text that contained special characters with the text STUFF WITH CONTROL CHARACTERS for it to render properly here.

Debugger entered--Lisp error: (args-out-of-range 1 1)
  vertical-motion(37 nil)
  (1+ (vertical-motion (or max (buffer-size)) window))
  (save-restriction (widen) (narrow-to-region (min beg end) (if (and (not count-final-newline) (= 10 (char-before (max beg end)))) (1- (max beg end)) (max beg end))) (goto-char (point-min)) (1+ (vertical-motion (or max (buffer-size)) window)))
  (save-excursion (save-restriction (widen) (narrow-to-region (min beg end) (if (and (not count-final-newline) (= 10 (char-before (max beg end)))) (1- (max beg end)) (max beg end))) (goto-char (point-min)) (1+ (vertical-motion (or max (buffer-size)) window))))
  (if (= beg end) 0 (save-excursion (save-restriction (widen) (narrow-to-region (min beg end) (if (and (not count-final-newline) (= 10 (char-before ...))) (1- (max beg end)) (max beg end))) (goto-char (point-min)) (1+ (vertical-motion (or max (buffer-size)) window)))))
  (let (count-final-newline window) (if (= beg end) 0 (save-excursion (save-restriction (widen) (narrow-to-region (min beg end) (if (and (not count-final-newline) (= 10 ...)) (1- (max beg end)) (max beg end))) (goto-char (point-min)) (1+ (vertical-motion (or max (buffer-size)) window))))))
  vim-empty-lines-count-screen-lines(2760 5382 37)
  (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height))
  (- screen-height (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height)))
  (let ((screen-height (- (window-height) 1 (if header-line-format 1 0)))) (- screen-height (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height))))
  (save-current-buffer (set-buffer (window-buffer)) (let ((screen-height (- (window-height) 1 (if header-line-format 1 0)))) (- screen-height (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height)))))
  (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer (window-buffer)) (let ((screen-height (- (window-height) 1 (if header-line-format 1 0)))) (- screen-height (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height))))))
  (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer (window-buffer)) (let ((screen-height (- (window-height) 1 (if header-line-format 1 0)))) (- screen-height (1- (vim-empty-lines-count-screen-lines (window-start) (point-max) screen-height)))))) (internal--after-with-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer (window-buffer)) (let ((screen-height (- ... 1 ...))) (- screen-height (1- (vim-empty-lines-count-screen-lines ... ... screen-height)))))) (internal--after-with-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer (window-buffer)) (let ((screen-height ...)) (- screen-height (1- ...))))) (internal--after-with-selected-window save-selected-window--state))))
  (progn (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer (window-buffer)) (let (...) (- screen-height ...)))) (internal--after-with-selected-window save-selected-window--state)))))
  (unwind-protect (progn (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer ...) (let ... ...))) (internal--after-with-selected-window save-selected-window--state))))) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window ... ...) (save-current-buffer ... ...)) (internal--after-with-selected-window save-selected-window--state))))) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn ... ...) (internal--after-with-selected-window save-selected-window--state))))) (internal--after-save-selected-window save-selected-window--state))))
  vim-empty-lines-nlines-after-buffer-end-aux(#<window 3 on *Backtrace*>)
  (if (and window-start (or (and (window-end) (= (point-max) (window-end))) (not (pos-visible-in-window-p (point-max) window)))) 0 (vim-empty-lines-nlines-after-buffer-end-aux window))
  (save-current-buffer (set-buffer (window-buffer window)) (if (and window-start (or (and (window-end) (= (point-max) (window-end))) (not (pos-visible-in-window-p (point-max) window)))) 0 (vim-empty-lines-nlines-after-buffer-end-aux window)))
  vim-empty-lines-nlines-after-buffer-end(#<window 3 on *Backtrace*> nil)
  (apply (quote max) (vim-empty-lines-nlines-after-buffer-end w window-start) (mapcar (quote vim-empty-lines-nlines-after-buffer-end) (remq w (get-buffer-window-list nil nil t))))
  (vim-empty-lines-update-overlay-aux (apply (quote max) (vim-empty-lines-nlines-after-buffer-end w window-start) (mapcar (quote vim-empty-lines-nlines-after-buffer-end) (remq w (get-buffer-window-list nil nil t)))))
  (progn (vim-empty-lines-update-overlay-aux (apply (quote max) (vim-empty-lines-nlines-after-buffer-end w window-start) (mapcar (quote vim-empty-lines-nlines-after-buffer-end) (remq w (get-buffer-window-list nil nil t))))) (move-overlay vim-empty-lines-overlay (point-max) (point-max)))
  (if (overlayp vim-empty-lines-overlay) (progn (vim-empty-lines-update-overlay-aux (apply (quote max) (vim-empty-lines-nlines-after-buffer-end w window-start) (mapcar (quote vim-empty-lines-nlines-after-buffer-end) (remq w (get-buffer-window-list nil nil t))))) (move-overlay vim-empty-lines-overlay (point-max) (point-max))))
  (let ((w (or window (let ((w (selected-window))) (and (window-valid-p w) w))))) (if (overlayp vim-empty-lines-overlay) (progn (vim-empty-lines-update-overlay-aux (apply (quote max) (vim-empty-lines-nlines-after-buffer-end w window-start) (mapcar (quote vim-empty-lines-nlines-after-buffer-end) (remq w (get-buffer-window-list nil nil t))))) (move-overlay vim-empty-lines-overlay (point-max) (point-max)))))
  vim-empty-lines-update-overlay(#<window 3 on *Backtrace*>)
  (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w))
  (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w)) (internal--after-with-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w)) (internal--after-with-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-with-selected-window w))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w)) (internal--after-with-selected-window save-selected-window--state))))
  (lambda (w) (let ((save-selected-window--state (internal--before-with-selected-window w))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w)) (internal--after-with-selected-window save-selected-window--state)))))(#<window 3 on *Backtrace*>)
  mapc((lambda (w) (let ((save-selected-window--state (internal--before-with-selected-window w))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (vim-empty-lines-update-overlay w)) (internal--after-with-selected-window save-selected-window--state))))) (#<window 3 on *Backtrace*>))
  (progn (mapc (function (lambda (w) (let ((save-selected-window--state (internal--before-with-selected-window w))) (save-current-buffer (unwind-protect (progn ... ...) (internal--after-with-selected-window save-selected-window--state)))))) (window-list (selected-frame) -1)))
  (unwind-protect (progn (mapc (function (lambda (w) (let ((save-selected-window--state ...)) (save-current-buffer (unwind-protect ... ...))))) (window-list (selected-frame) -1))) (internal--after-save-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (mapc (function (lambda (w) (let (...) (save-current-buffer ...)))) (window-list (selected-frame) -1))) (internal--after-save-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (mapc (function (lambda (w) (let ... ...))) (window-list (selected-frame) -1))) (internal--after-save-selected-window save-selected-window--state))))
  (progn (select-frame (selected-frame) (quote norecord)) (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (mapc (function (lambda ... ...)) (window-list (selected-frame) -1))) (internal--after-save-selected-window save-selected-window--state)))))
  (unwind-protect (progn (select-frame (selected-frame) (quote norecord)) (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (mapc (function ...) (window-list ... -1))) (internal--after-save-selected-window save-selected-window--state))))) (if (frame-live-p old-frame) (progn (select-frame old-frame (quote norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer))))
  (let ((old-frame (selected-frame)) (old-buffer (current-buffer))) (unwind-protect (progn (select-frame (selected-frame) (quote norecord)) (let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn (mapc ... ...)) (internal--after-save-selected-window save-selected-window--state))))) (if (frame-live-p old-frame) (progn (select-frame old-frame (quote norecord)))) (if (buffer-live-p old-buffer) (progn (set-buffer old-buffer)))))
  vim-empty-lines-update-overlay-windows()
  #<subr set-window-buffer>(nil #<buffer *SUMO*> nil)
  ad-Advice-set-window-buffer(#<subr set-window-buffer> nil #<buffer *SUMO*>)
  apply(ad-Advice-set-window-buffer #<subr set-window-buffer> (nil #<buffer *SUMO*>))
  set-window-buffer(nil #<buffer *SUMO*>)
  #[(buffer-or-name &optional norecord force-same-window) "STUFF WITH CONTROL CHARACTERS" [buffer-or-name buffer force-same-window norecord entry switch-to-buffer-preserve-window-point window-normalize-buffer-to-switch-to window-buffer window-minibuffer-p user-error "Cannot switch buffers in minibuffer window" pop-to-buffer window-dedicated-p t "Cannot switch buffers in a dedicated window" window-prev-buffers already-displayed get-buffer-window 0 set-window-buffer nil set-window-start selected-window set-window-point 2 select-window displayed] 5 2229158 (list (read-buffer-to-switch "Switch to buffer: ") nil (quote force-same-window))](#<buffer *SUMO*> nil nil)
  ad-Advice-switch-to-buffer(#[(buffer-or-name &optional norecord force-same-window) "STUFF WITH CONTROL CHARACTERS" [buffer-or-name buffer force-same-window norecord entry switch-to-buffer-preserve-window-point window-normalize-buffer-to-switch-to window-buffer window-minibuffer-p user-error "Cannot switch buffers in minibuffer window" pop-to-buffer window-dedicated-p t "Cannot switch buffers in a dedicated window" window-prev-buffers already-displayed get-buffer-window 0 set-window-buffer nil set-window-start selected-window set-window-point 2 select-window displayed] 5 2229158 (list (read-buffer-to-switch "Switch to buffer: ") nil (quote force-same-window))] #<buffer *SUMO*>)
  apply(ad-Advice-switch-to-buffer #[(buffer-or-name &optional norecord force-same-window) "STUFF WITH CONTROL CHARACTERS" [buffer-or-name buffer force-same-window norecord entry switch-to-buffer-preserve-window-point window-normalize-buffer-to-switch-to window-buffer window-minibuffer-p user-error "Cannot switch buffers in minibuffer window" pop-to-buffer window-dedicated-p t "Cannot switch buffers in a dedicated window" window-prev-buffers already-displayed get-buffer-window 0 set-window-buffer nil set-window-start selected-window set-window-point 2 select-window displayed] 5 2229158 (list (read-buffer-to-switch "Switch to buffer: ") nil (quote force-same-window))] #<buffer *SUMO*>)
  switch-to-buffer(#<buffer *SUMO*>)
  helm-switch-to-buffers(#<buffer *SUMO*>)
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  #[0 "STUFF WITH CONTROL CHARACTERS" [(helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil nil mapcar #[257 "STUFF WITH CONTROL CHARACTERS" [] 3 "\n\n(fn V)"] funcall make-byte-code 0 "STUFF WITH CONTROL CHARACTERS" vconcat vector [nil helm-log "restore variables"] 5 "\n\n(fn)" helm-initialize helm-display-buffer helm--remap-mouse-mode 1 add-hook post-command-hook helm--maybe-update-keymap helm--update-header-line helm-log "show prompt" #[0 "\300 \207" [helm-cleanup] 1 "\n\n(fn)"] helm-read-pattern-maybe helm-execute-selection-action "[End session] " make-string 41 45 helm-buffer helm-quit helm-in-persistent-action helm-current-source helm-source-name helm-restored-variables helm-prevent-escaping-from-minibuffer] 9 "\n\n(fn)"]()
  funcall(#[0 "STUFF WITH CONTROL CHARACTERS" [(helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil nil mapcar #[257 "STUFF WITH CONTROL CHARACTERS" [] 3 "\n\n(fn V)"] funcall make-byte-code 0 "STUFF WITH CONTROL CHARACTERS" vconcat vector [nil helm-log "restore variables"] 5 "\n\n(fn)" helm-initialize helm-display-buffer helm--remap-mouse-mode 1 add-hook post-command-hook helm--maybe-update-keymap helm--update-header-line helm-log "show prompt" #[0 "\300 \207" [helm-cleanup] 1 "\n\n(fn)"] helm-read-pattern-maybe helm-execute-selection-action "[End session] " make-string 41 45 helm-buffer helm-quit helm-in-persistent-action helm-current-source helm-source-name helm-restored-variables helm-prevent-escaping-from-minibuffer] 9 "\n\n(fn)"])
  helm-internal((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil)
  apply(helm-internal ((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil))
  helm((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil)
  apply(helm ((helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) nil nil nil nil "*helm mini*" nil nil nil))
  helm(:sources (helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) :buffer "*helm mini*" :ff-transformer-show-only-basename nil :truncate-lines t)
  helm-mini()
  call-interactively(helm-mini nil nil)
  command-execute(helm-mini)

EDIT3: I haven't set up email for emacs yet, and I have already opened this issue, so I'm waiting to contact the bug mailing list I found. Might still be useful to add the bug report information here.

Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6)
 of 2016-06-04 on juergen
Package: Org-mode version 8.3.4 (8.3.4-79-gbd4948-elpaplus @ /home/simendsjo/.emacs.d/elpa/org-plus-contrib-20160606/)

current state:
==============
(setq
 org-id-locations-file "/home/simendsjo/.emacs.d/.cache/.org-id-locations"
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-clock-persist-file "/home/simendsjo/.emacs.d/.cache/org-clock-save.el"
 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-html-format-drawer-function '(lambda (name contents) contents)
 org-log-done 'time
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-link-translation-function 'toc-org-unhrefify
 org-present-mode-hook '(spacemacs//org-present-start)
 org-agenda-restore-windows-after-quit t
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file "notes.org"
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 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 '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
                 #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes spacemacs/load-yasnippet toc-org-enable org-bullets-mode
                 flyspell-mode spacemacs/add-org-surrounds evil-org-mode org-eldoc-load spacemacs//init-company-org-mode
                 company-mode)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-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-plantuml-jar-path "/opt/plantuml/plantuml.jar"
 org-present-mode-quit-hook '(spacemacs//org-present-end)
 org-export-async-init-file "/home/simendsjo/.emacs.d/layers/org/org-async-init.el"
 org-babel-tangle-lang-exts '(("haskell" . "hs") ("emacs-lisp" . "el") ("elisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-with-inline-images t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-mobile-directory "~/Dropbox/Apps/MobileOrg"
 org-babel-load-languages '((emacs-lisp) (plantuml . t) (sql . t) (haskell . t) (sh . t))
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
 org-fontify-whole-heading-line t
 org-agenda-files '("~/org/notes.org" "~/org/todo.org" "~/org/work.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-confirm-babel-evaluate 'simendsjo/org-confirm-babel-evaluate
 org-mobile-inbox-for-pull "~/org/inbox.org"
 )

EDIT4: Looking at the org-mobile.el, the error seems to be within this block:

(message "Creating agendas...")
(let ((inhibit-redisplay t)
(org-agenda-files (mapcar 'car org-mobile-files-alist)))
  (org-mobile-create-sumo-agenda))
(message "Creating agendas...done")

I don't become any smarter though :/

EDIT6: Could it be something strange with this variable?

org-mobile-files-alist is a variable defined in `org-mobile.el'.
Its value is (("~/org/notes.org" . "notes.org")
("~/org/todo.org" . "todo.org")
("~/org/work.org" . "work.org"))

EDIT7: I notice it creates the buffer *SUMO* containing my agendas:

Week-agenda (W23):
Monday      6 June 2016 W23
Tuesday     7 June 2016
Wednesday   8 June 2016
Thursday    9 June 2016
Friday     10 June 2016
    todo:       Scheduled:  DONE some task here
Saturday   11 June 2016
    todo:       In   6 d.:  TODO some task :tag1:tag2:
Sunday     12 June 2016

=======================================================================================================================================
Global list of TODO items of type: ALL
    notes:      TODO task
    todo:       TODO other task
    todo:       TODO ... more tasks

=======================================================================================================================================
Week-agenda (W23):
more agenda views

EDIT8: With some tedious printf debugging I found the failing line. I still have no idea why it fails.

(defun org-store-agenda-views (&rest parameters)
  "Store agenda views."
  (interactive)
  ; This line below is the one that fails
  (eval (list 'org-batch-store-agenda-views)))

The documentation for the function

org-batch-store-agenda-views is an autoloaded Lisp macro in `org-agenda.el'.

(org-batch-store-agenda-views &rest PARAMETERS)

Run all custom agenda commands that have a file argument.

EDIT9: I've further reduced it. It's a bit difficult for me to go deeper as I don't even know how I can print information about variables correctly. Look at the comment in the following code block

;;;###autoload
(defmacro org-batch-store-agenda-views (&rest parameters)
  "Run all custom agenda commands that have a file argument."
  (let ((cmds (org-agenda-normalize-custom-commands org-agenda-custom-commands))
  (pop-up-frames nil)
  (dir default-directory)
  (pars (org-make-parameter-alist parameters))
  cmd thiscmdkey thiscmdcmd match files opts cmd-or-set bufname)
    (save-window-excursion
      (while cmds
  (setq cmd (pop cmds)
        thiscmdkey (car cmd)
        thiscmdcmd (cdr cmd)
        match (nth 2 thiscmdcmd)
        bufname (if org-agenda-sticky
        (or (and (stringp match)
          (format "*Org Agenda(%s:%s)*" thiscmdkey match))
            (format "*Org Agenda(%s)*" thiscmdkey))
      org-agenda-buffer-name)
        cmd-or-set (nth 2 cmd)
        opts (nth (if (listp cmd-or-set) 3 4) cmd)
        files (nth (if (listp cmd-or-set) 4 5) cmd))
  (if (stringp files) (setq files (list files)))
  (when files
    (message "BUG: The next statement crashes with '1+: Args out of range: 1, 1'")
    ; It seems it's the following thing that crashes within the eval call
    ; (org-agenda nil thiscmdkey)
    (org-eval-in-environment (append org-agenda-exporter-settings
            opts pars)
      (org-agenda nil thiscmdkey))
    ; We never get here
    (set-buffer bufname)
    (while files
      (org-eval-in-environment (append org-agenda-exporter-settings
              opts pars)
        (org-agenda-write (expand-file-name (pop files) dir) nil t bufname)))
    (and (get-buffer bufname)
        (kill-buffer bufname)))))))
1

I "found" the bug. The problem was the vim-empty-lines package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.