radian-software / radian

🍉 Dotfiles that marry elegance and practicality.
MIT License
490 stars 47 forks source link

org-version is N/A on native-comp, even after trying hacks #466

Closed thomasheartman closed 3 years ago

thomasheartman commented 3 years ago

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!

thomasheartman commented 3 years ago

Oops, sorry. This should have been on straight.el. I'll close this one and open a new one there. My bad!