0

After updating my system I get the error at the bottom when exporting C-c C-e C-s (cursor on My Subject). Can someone explain me the error message in order to solve the problem?

my_letters.org:

* My koma letters
  :PROPERTIES:
  :EXPORT_AUTHOR: John Q
  :EXPORT_FROM_ADDRESS: Av. Foo, Acmetown
  :EXPORT_CLOSING: best regards
  :EXPORT_LATEX_CLASS: default-koma-letter
  :EXPORT_LATEX_HEADER: \AtBeginLetter{\setplength{toaddrhpos}{119mm}}
  :EXPORT_LATEX_HEADER+: \AtBeginLetter{\setplength{toaddrvpos}{60mm}}
  :EXPORT_LATEX_HEADER+: \AtBeginLetter{\setplength{toaddrindent}{0}}
  :EXPORT_LaTeX_HEADER+: \AtBeginLetter{\setplength{backaddrheight}{10}}
  :EXPORT_LaTeX_HEADER+: \AtBeginLetter{\setplength{toaddrheight}{25.5mm}}
  :EXPORT_LATEX_HEADER+: \AtBeginLetter{\addtokomafont{addressee}{\scriptsize}}
  :EXPORT_LATEX_HEADER+: \usepackage{pdfpages}
  :EXPORT_LATEX_HEADER+: \setlength\parindent{0pt}
  :EXPORT_OPTIONS: backaddress:t email:nil
  :EXPORT_OPTIONS+: foldmarks:nil phone:nil place:nil special-headings:nil subject:t
  :EXPORT_OPTIONS+: title-subject:t url:nil location:nil title:t
  :EXPORT_OPTIONS+: \n:t
  :END:
** My Subject
   :PROPERTIES:
   :EXPORT_Date: [2022-04-11 Mon]
   :EXPORT_TO_ADDRESS: Acme Inc.
   :EXPORT_OPTIONS+: title-subject:t location:t title:t
   :EXPORT_OPENING: Dear Mr. Foo
   :END:

Vivamus id enim.  

Debugger entered--Lisp error: (args-out-of-range 1 1137 1156)
  line-number-at-pos(1)
  vim-empty-lines-nlines-after-buffer-end(nil)
  vim-empty-lines-update-overlay()
  vim-empty-lines-mode(1)
  global-vim-empty-lines-mode-enable-in-buffers()
  run-hooks(after-change-major-mode-hook)
  run-mode-hooks(org-mode-hook)
  org-mode()
  (let ((org-mode-hook nil) (org-inhibit-startup t)) (org-mode))
  (let ((inhibit-modification-hooks t)) (let ((org-mode-hook nil) (org-inhibit-startup t)) (org-mode)) (set (make-local-variable 'org-superstar--font-lock-keywords) '(("^[ \11]*?\\(?:\\(?1:[-+]\\)\\|[ \11]\\(?1:\\*\\)\\) " (1 (org-superstar--prettify-ibullets))) ("^\\(?3:\\**?\\)\\(?2:\\*?\\)\\(?1:\\*\\) " (1 (org-superstar--prettify-main-hbullet) prepend) (3 (org-superstar--prettify-leading-hbullets) t) (2 (org-superstar--prettify-other-lbullet) t)))) (set (make-local-variable 'org-superstar-mode) 't) (set (make-local-variable 'org-target-link-regexp) 'nil) (set (make-local-variable 'org-macro-templates) '(("date" . "10.10.2019") ("title" . "How to append an argument to an external command i...") ("email" . "ra@notebox.ch") ("author" . "") ("input-file" . "koma.org") ("modification-time" . "(eval\n(format-time-string $1\n                     ...") ("n" . "(eval (org-macro--counter-increment $1 $2))") ("keyword" . "(eval (org-macro--find-keyword-value $1))") ("time" . "(eval (format-time-string $1))") ("property" . "(eval (org-macro--get-property $1 $2))"))) (set (make-local-variable 'org-table-may-need-update) 't) (set (make-local-variable 'org-latex-and-related-regexp) '"") (set (make-local-variable 'org-todo-line-tags-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(.*?\\)\\)??\\(...") (set (make-local-variable 'org-complex-heading-regexp-format) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?...") (set (make-local-variable 'org-complex-heading-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?...") (set (make-local-variable 'org-todo-line-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(.*?\\)\\)?[ \11...") (set (make-local-variable 'org-not-done-heading-regexp) '"^\\(\\*+\\)\\(?: +\\(TODO\\)\\)\\(?: +\\(.*?\\)\\)?[ \11]*$") (set (make-local-variable 'org-not-done-regexp) '"\\(TODO\\)") (set (make-local-variable 'org-todo-regexp) '"\\(DONE\\|TODO\\)") (set (make-local-variable 'org-not-done-keywords) '("TODO")) (set (make-local-variable 'org-todo-log-states) 'nil) (set (make-local-variable 'org-todo-sets) '(("TODO" "DONE"))) (set (make-local-variable 'org-todo-heads) '("TODO")) (set (make-local-variable 'org-done-keywords) '("DONE")) (set (make-local-variable 'org-todo-keywords-1) '("TODO" "DONE")) (set (make-local-variable 'org-todo-key-trigger) 'nil) (set (make-local-variable 'org-todo-key-alist) '((:startgroup) ("TODO" . 116) ("DONE" . 100) (:endgroup))) (set (make-local-variable 'org-todo-kwd-alist) '(("TODO" sequence "TODO" "DONE" "DONE") ("DONE" sequence "TODO" "DONE" "DONE"))) (set (make-local-variable 'org-table-formula-constants-local) 'nil) (set (make-local-variable 'org-keyword-properties) 'nil) (set (make-local-variable 'org-tag-groups-alist) 'nil) (set (make-local-variable 'org-current-tag-alist) 'nil) (set (make-local-variable 'org-file-tags) 'nil) (set (make-local-variable 'org-startup-with-inline-images) 'nil) (set (make-local-variable 'org-link-descriptive) 't) (set (make-local-variable 'buffer-file-name) '"/home/user/koma.org") (set (make-local-variable 'default-directory) '"/home/user/org/") (set (make-local-variable 'buffer-file-coding-system) 'utf-8-unix) (insert #("* My pingen letters\n  :PROPERTIES:\n  :EXPORT_AUTHO..." 0 1 (composition (0 1 [9673]) face (org-superstar-header-bullet org-level-1) fontified t) 1 19 (face org-level-1 fontified t) 19 22 (fontified t) 22 34 (face org-drawer fontified t font-lock-fontified t) 34 37 (fontified t) 37 52 (face org-special-keyword font-lock-fontified t fontified t) 52 53 (fontified t) 53 59 (face org-property-value fontified t) 59 62 (fontified t) 62 83 (face org-special-keyword font-lock-fontified t fontified t) 83 84 (fontified t) 84 101 (face org-property-value fontified t) 101 104 (fontified t) 104 120 (face org-special-keyword font-lock-fontified t fontified t) 120 121 (fontified t) 121 133 (face org-property-value fontified t) ...)) (narrow-to-region 1137 1156) (goto-char 1137))
  (lambda nil (let ((inhibit-modification-hooks t)) (let ((org-mode-hook nil) (org-inhibit-startup t)) (org-mode)) (set (make-local-variable 'org-superstar--font-lock-keywords) '(("^[ \11]*?\\(?:\\(?1:[-+]\\)\\|[ \11]\\(?1:\\*\\)\\) " (1 (org-superstar--prettify-ibullets))) ("^\\(?3:\\**?\\)\\(?2:\\*?\\)\\(?1:\\*\\) " (1 (org-superstar--prettify-main-hbullet) prepend) (3 (org-superstar--prettify-leading-hbullets) t) (2 (org-superstar--prettify-other-lbullet) t)))) (set (make-local-variable 'org-superstar-mode) 't) (set (make-local-variable 'org-target-link-regexp) 'nil) (set (make-local-variable 'org-macro-templates) '(("date" . "10.10.2019") ("title" . "How to append an argument to an external command i...") ("email" . "ra@notebox.ch") ("author" . "") ("input-file" . "koma.org") ("modification-time" . "(eval\n(format-time-string $1\n                     ...") ("n" . "(eval (org-macro--counter-increment $1 $2))") ("keyword" . "(eval (org-macro--find-keyword-value $1))") ("time" . "(eval (format-time-string $1))") ("property" . "(eval (org-macro--get-property $1 $2))"))) (set (make-local-variable 'org-table-may-need-update) 't) (set (make-local-variable 'org-latex-and-related-regexp) '"") (set (make-local-variable 'org-todo-line-tags-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(.*?\\)\\)??\\(...") (set (make-local-variable 'org-complex-heading-regexp-format) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?...") (set (make-local-variable 'org-complex-heading-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?...") (set (make-local-variable 'org-todo-line-regexp) '"^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(.*?\\)\\)?[ \11...") (set (make-local-variable 'org-not-done-heading-regexp) '"^\\(\\*+\\)\\(?: +\\(TODO\\)\\)\\(?: +\\(.*?\\)\\)?[ \11]*$") (set (make-local-variable 'org-not-done-regexp) '"\\(TODO\\)") (set (make-local-variable 'org-todo-regexp) '"\\(DONE\\|TODO\\)") (set (make-local-variable 'org-not-done-keywords) '("TODO")) (set (make-local-variable 'org-todo-log-states) 'nil) (set (make-local-variable 'org-todo-sets) '(("TODO" "DONE"))) (set (make-local-variable 'org-todo-heads) '("TODO")) (set (make-local-variable 'org-done-keywords) '("DONE")) (set (make-local-variable 'org-todo-keywords-1) '("TODO" "DONE")) (set (make-local-variable 'org-todo-key-trigger) 'nil) (set (make-local-variable 'org-todo-key-alist) '((:startgroup) ("TODO" . 116) ("DONE" . 100) (:endgroup))) (set (make-local-variable 'org-todo-kwd-alist) '(("TODO" sequence "TODO" "DONE" "DONE") ("DONE" sequence "TODO" "DONE" "DONE"))) (set (make-local-variable 'org-table-formula-constants-local) 'nil) (set (make-local-variable 'org-keyword-properties) 'nil) (set (make-local-variable 'org-tag-groups-alist) 'nil) (set (make-local-variable 'org-current-tag-alist) 'nil) (set (make-local-variable 'org-file-tags) 'nil) (set (make-local-variable 'org-startup-with-inline-images) 'nil) (set (make-local-variable 'org-link-descriptive) 't) (set (make-local-variable 'buffer-file-name) '"/home/user/org/koma.org") (set (make-local-variable 'default-directory) '"/home/user/org/") (set (make-local-variable 'buffer-file-coding-system) 'utf-8-unix) (insert #("* My pingen letters\n  :PROPERTIES:\n  :EXPORT_AUTHO..." 0 1 (composition (0 1 [9673]) face (org-superstar-header-bullet org-level-1) fontified t) 1 19 (face org-level-1 fontified t) 19 22 (fontified t) 22 34 (face org-drawer fontified t font-lock-fontified t) 34 37 (fontified t) 37 52 (face org-special-keyword font-lock-fontified t fontified t) 52 53 (fontified t) 53 59 (face org-property-value fontified t) 59 62 (fontified t) 62 83 (face org-special-keyword font-lock-fontified t fontified t) 83 84 (fontified t) 84 101 (face org-property-value fontified t) 101 104 (fontified t) 104 120 (face org-special-keyword font-lock-fontified t fontified t) 120 121 (fontified t) 121 133 (face org-property-value fontified t) ...)) (narrow-to-region 1137 1156) (goto-char 1137)))()
  org-export-copy-buffer()
  org-export-as(koma-letter t nil nil (:output-file "koma.tex"))
  org-export-to-file(koma-letter "koma.tex" nil t nil nil nil (lambda (file) (org-latex-compile file)))
  (let ((file (org-export-output-file-name ".tex" subtreep)) (org-koma-letter-special-contents)) (org-export-to-file 'koma-letter file async subtreep visible-only body-only ext-plist #'(lambda (file) (org-latex-compile file))))
  org-koma-letter-export-to-pdf(nil t nil nil)
  (org-open-file (org-koma-letter-export-to-pdf nil s v b))
  (if a (org-koma-letter-export-to-pdf t s v b) (org-open-file (org-koma-letter-export-to-pdf nil s v b)))
  (lambda (a s v b) (if a (org-koma-letter-export-to-pdf t s v b) (org-open-file (org-koma-letter-export-to-pdf nil s v b))))(nil t nil nil)
  org-export-dispatch(nil)
  funcall-interactively(org-export-dispatch nil)
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)
2
  • This seems to be an artifact of global-vim-lines-mode-enable-in-buffers. You can make sure that that is the case by deleting the function from after-change-major-mode-hook. Assuming that it then works, complain to whoever defined that function.
    – NickD
    Jun 28 at 16:25
  • The front page of the project has an explanation: basically, the maintainer has not found the time to fix various issues similar to the one you complain about. I would suggest deleting that function from the hook permanently.
    – NickD
    Jun 28 at 16:31

1 Answer 1

1

As the project page states, the project has bugs and the maintainer does not have enough time to fix them. I would suggest that you find the place in your init file(s) where you add the function global-vim-lines-mode-enable-in-buffers to the after-change-major-mode-hook hook variable. It probably looks something like this:

(add-hook 'after-change-major-mode-hook #'global-vim-lines-mode-enable-in-buffers)

Just delete this line. If you want to try removing it temporarily to check that it is indeed the culprit, you can eval the following expression (perhaps in your *scratch* buffer):

(remove-hook 'after-change-major-mode-hook #'global-vim-lines-mode-enable-in-buffers)

But I really think that you should remove it permanently: buggy packages do not become bug-free with time unless somebody is working actively on the bugs. This does not seem to be the case here.

Edit: I checked the package and it does not seem to be adding the function to the hook. At this point, I would try emacs -Q (or its doom equivalent: I assume there is one but I don't know for sure) and check the after-change-major-mode-hook to make sure that it does not contain global-vim-lines... by default. Then do the same thing with emacs -q. If in both of these cases the hook does not contain the global-vim-lines... function, then it's got to be in your init file(s). Search for the hook and/or the function separately and see what you come up with.

2
  • There's no global-vim.. line in my config (.spacemacs.d/init.el). Thinking of vim though I'm thinking of the emacs-evil package as part of spacemacs
    – jjk
    Jun 29 at 5:42
  • Examine the value of the hook with C-h v after-change-major-mode-hook. If global-vim-lines-mode-enable-in-buffers is in it, then somebody must have added it. It may be the package itself, in which case, if you remove the package, then it should go away.
    – NickD
    Jun 29 at 12:09

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.