bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.24k stars 123 forks source link

Strange Invalid version syntax: '' (must start with a number) error when loading the package #317

Closed unparadise closed 3 years ago

unparadise commented 3 years ago

Describe the bug I am using Emacs 27.1-1 on Mac OS Big Sur Version 11.2 Beta. I followed the instruction to install the org-journal package and added (require 'org-journal) to my init.el file. When launching Emacs, the mini buffer shows the following error message.

error: Invalid version syntax: '' (must start with a number)

When trying to create a new entry using the M-x org-journal-new-entry command, the same error message is shown in the mini buffer.

To Reproduce

  1. Make sure that you are running Mac OS Big Sur Version 11.2 Beta.
  2. Download and install Emacs for Mac from https://emacsformacosx.com.
  3. Type "M-x package-instal"l and press Enter.
  4. Type "org-journal" and press Enter.
  5. Wait till the installation completes.
  6. Type "C-x C-c" to exit Emacs.
  7. Launch Emacs again.
  8. Notice the aforementioned error message is shown in the mini buffer after launch.

Expected behavior The package should be correctly loaded and no message is shown.

Screenshots I have attached a screen shot that shows the error message after launch. org-journal_error_message

Desktop (please complete the following information):

Your Emacs Configuration (require 'org-journal)

casch-at commented 3 years ago

Please post the backtrace when starting emacs with the --debug-init flag as proposed. I don't own a Mac so can't triage the error myself.

tlondude commented 3 years ago

I get the same error running on Windows. Buffer position 1314 is where my (require 'org-journal) is. Backtrace: Debugger entered--Lisp error: (error "Invalid version syntax: ‘’ (must start with a number)") signal(error ("Invalid version syntax: ‘’ (must start with a number)")) error("Invalid version syntax: `%s' (must start with a number)" "") version-to-list("") version<("" "9.2") byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\310\10\311\"\203$\0\312\313\314\"\210\315\316!\2044\0\312\317\320\"\210\312\316\317\"\210\321\322\323\324\325\326\327\304\327\322&\11\210\330\331\332\333#\207" [org-version require cal-iso epa org org-crypt seq subr-x version< "9.2" defalias org-set-tags-to org-set-tags fboundp org--tag-add-to-alist org-tag-add-to-alist #f(compiled-function (alist1 alist2) "Append ALIST1 elements to ALIST2 if they are not there yet.\n\nFrom branch \"emacs-26\", added for compatibility." #<bytecode 0x741f3ad828e8868>) custom-declare-group org-journal nil "Settings for the personal journal" :version "1.15.1" :group custom-declare-face org-journal-highlight ((t (:foreground "#ff1493"))) "Face for highlighting org-journal buffers."] 10) require(org-journal) eval-buffer(#<buffer *load*> nil "/.emacs" nil t) ; Reading at buffer position 1314 load-with-code-conversion("/.emacs" "/.emacs" t t) load("/.emacs" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x8a2795a6750fe3f>) #f(compiled-function () #<bytecode 0x81a386fa1b70593>) t) command-line() normal-top-level()

casch-at commented 3 years ago

The error comes from line (when (version< org-version "9.2"). org-version resolves to "", and therefore version< throws an error. Does the error go away if you delete the byte-compiled version of org-journal (org-journal.elc)?

unparadise commented 3 years ago

Hi cslyx and tlondude, thank you both for helping out with this issue.

@cslux, I tried removing the compiled org-journal.elc file from the elpa folder in .emacs.d. But still got the same error. :( Below is the backtrace I received.

Debugger entered--Lisp error: (error "Invalid version syntax: ‘’ (must start with a numb...") signal(error ("Invalid version syntax: ‘’ (must start with a numb...")) error("Invalid version syntax: `%s' (must start with a nu..." "") version-to-list("") version<("" "9.2") (if (version< org-version "9.2") (progn (defalias 'org-set-tags-to 'org-set-tags))) eval-buffer(#<buffer load-173618> nil "/Users/frank/.emacs.d/elpa/org-journal-2020122..." nil t) ; Reading at buffer position 3444 load-with-code-conversion("/Users/frank/.emacs.d/elpa/org-journal-2020122..." "/Users/frank/.emacs.d/elpa/org-journal-2020122..." nil t) require(org-journal) eval-buffer(#<buffer load> nil "/Users/frank/.emacs.d/init.el" nil t) ; Reading at buffer position 263 load-with-code-conversion("/Users/frank/.emacs.d/init.el" "/Users/frank/.emacs.d/init.el" t t) load("/Users/frank/.emacs.d/init" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1ff6aba7a259>) #f(compiled-function () #<bytecode 0x1ff6aba7a271>) t) command-line() normal-top-level()

casch-at commented 3 years ago

Hmmm... Can you post the output of M-: org-version and M-: (org-version) org-version is a variable defined in org.el which gets assigned the value of the function org-version (org-version) Maybe, we need to use (org-version) instead of org-version.

tlondude commented 3 years ago

With org 9.4 installed I get "9.4" with M-: org-version or M-: (org-version), but with org 9.4.4 installed I get "" with both. Edit: forgot to add that I get the version error for org-journal with org 9.4.4 installed, but not 9.4

casch-at commented 3 years ago

Interesting, version 9.4.4 works for me.

tlondude commented 3 years ago

I found this bug report: https://orgmode.org/list/87y2hi9qev.fsf@gmx.com/

and when I look at org-version.el for 9.4:


;;; org-version.el --- autogenerated file, do not edit ;; ;;; Code: ;;;###autoload (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." (let ((org-release "9.4")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." (let ((org-git-version "9.4-elpa")) org-git-version)) (provide 'org-version) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; coding: utf-8 ;; End: ;;; org-version.el ends here


vs 9.4.4


;;; org-version.el --- autogenerated file, do not edit ;; ;;; Code: ;;;###autoload (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." (let ((org-release "")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." (let ((org-git-version "")) org-git-version)) (provide 'org-version) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; coding: utf-8 ;; End: ;;; org-version.el ends here

unparadise commented 3 years ago

I am also seeing that issue with org-version 9.4.4

casch-at commented 3 years ago

I found this bug report: https://orgmode.org/list/87y2hi9qev.fsf@gmx.com/

and when I look at org-version.el for 9.4:

;;; org-version.el --- autogenerated file, do not edit ;; ;;; Code: ;;;###autoload (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." (let ((org-release "9.4")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." (let ((org-git-version "9.4-elpa")) org-git-version)) (provide 'org-version) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; coding: utf-8 ;; End: ;;; org-version.el ends here

vs 9.4.4

;;; org-version.el --- autogenerated file, do not edit ;; ;;; Code: ;;;###autoload (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." (let ((org-release "")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." (let ((org-git-version "")) org-git-version)) (provide 'org-version) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; coding: utf-8 ;; End: ;;; org-version.el ends here

That are good news. Should be fixed soon in org. Leaving this issue open until than.

unparadise commented 3 years ago

Thanks for looking into this @cslux!

casch-at commented 3 years ago

No problem! I'm just wondering why it works for me.

I will definitely check out that particular commit which fixes this problem.

Happy new year to @all.

unparadise notifications@github.com writes:

Thanks for looking into this @cslux!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

casch-at commented 3 years ago

Oh :-) there is an actual organization ALL :-)

casch-at commented 3 years ago

This is not a org bug, this is a ELPA problem. Now it makes sense why some of you faced it, and some not (like me). I for instance have installed org-plus-contrib from the orgmode repo.

This works for me.

;;; ...
;;;
(add-to-list 'package-archives '("orgmode" . "https://orgmode.org/elpa/"))
;;; ...
(use-package org
    :ensure org-plus-contrib)
;;; ...

Screenshot from 2021-01-20 20-06-16 Screenshot from 2021-01-20 20-04-56

The org version from the gnu package archive has this problem.