First off: great work on this package! Both the documentation and the functionality are stellar.
However, as as documented, there are certain issues with org-mode. I'm trying to set this up on the feature/native-comp branch (using NixOS), but neither the old workaround and the new one seem to fix the issue. It seems that whatever I try, Emacs chokes on the org setup, reporting that "N/A" is not a valid version.
I can reproduce it with the following minimal configuration:
Emacs config that loads straight, use-package, and
org
```emacs-lisp
(setq straight-use-package-by-default t
straight-fix-flycheck t)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(message "Configured straight.el")
(straight-use-package 'use-package)
(use-package git)
(use-package org
:init
;; The following is a temporary hack until straight.el supports
;; building Org, see:
;;
;; * https://github.com/raxod502/straight.el/issues/211
;; * https://github.com/raxod502/radian/issues/410
;;
;; There are three things missing from our version of Org: the
;; functions `org-git-version' and `org-release', and the feature
;; `org-version'. We provide all three of those ourself, therefore.
(defun org-git-version ()
"The Git version of org-mode.
Inserted by installing org-mode or when a release is made."
(require 'git)
(let ((git-repo (expand-file-name
"straight/repos/org/" user-emacs-directory)))
(string-trim
(git-run "describe"
"--match=release\*"
"--abbrev=6"
"HEAD"))))
(defun org-release ()
"The release version of org-mode.
Inserted by installing org-mode or when a release is made."
(require 'git)
(let ((git-repo (expand-file-name
"straight/repos/org/" user-emacs-directory)))
(string-trim
(string-remove-prefix
"release_"
(git-run "describe"
"--match=release\*"
"--abbrev=0"
"HEAD")))))
(provide 'org-version))
(provide 'init)
;;; init.el ends here
```
Is there anything else to this workaround (that I'm missing), or
should this work in theory?
Versions
Emacs version: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
Hi,
First off: great work on this package! Both the documentation and the functionality are stellar.
However, as as documented, there are certain issues with org-mode. I'm trying to set this up on the feature/native-comp branch (using NixOS), but neither the old workaround and the new one seem to fix the issue. It seems that whatever I try, Emacs chokes on the org setup, reporting that "N/A" is not a valid version.
I can reproduce it with the following minimal configuration:
Emacs config that loads straight, use-package, and org
```emacs-lisp (setq straight-use-package-by-default t straight-fix-flycheck t) (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (message "Configured straight.el") (straight-use-package 'use-package) (use-package git) (use-package org :init ;; The following is a temporary hack until straight.el supports ;; building Org, see: ;; ;; * https://github.com/raxod502/straight.el/issues/211 ;; * https://github.com/raxod502/radian/issues/410 ;; ;; There are three things missing from our version of Org: the ;; functions `org-git-version' and `org-release', and the feature ;; `org-version'. We provide all three of those ourself, therefore. (defun org-git-version () "The Git version of org-mode. Inserted by installing org-mode or when a release is made." (require 'git) (let ((git-repo (expand-file-name "straight/repos/org/" user-emacs-directory))) (string-trim (git-run "describe" "--match=release\*" "--abbrev=6" "HEAD")))) (defun org-release () "The release version of org-mode. Inserted by installing org-mode or when a release is made." (require 'git) (let ((git-repo (expand-file-name "straight/repos/org/" user-emacs-directory))) (string-trim (string-remove-prefix "release_" (git-run "describe" "--match=release\*" "--abbrev=0" "HEAD"))))) (provide 'org-version)) (provide 'init) ;;; init.el ends here ```Is there anything else to this workaround (that I'm missing), or should this work in theory?
Versions
This is all the info I can think to provide right now. If you need anything else, please don't hesitate to ask.
Again, thanks for all your work and time on this!