Closed x61 closed 2 years ago
Would you mind evaluating the following test case in your *scratch* buffer and sharing the results?:
2021-11-17 09:54:58
gnu/linux
prerelease (HEAD -> develop, origin/develop) bf5faf0 2021-11-16
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.4, Xaw3d scroll bars) of 2021-11-03
"Testing straight.el in directory: /var/folders/zx/1000pjgs6bj28n4zn_60rwcm0000gn/T/straight.el-test-H8dUNm"
After the test completes a buffer with test results named "*straight-bug-report-process*" should display.
If you can't find that buffer, it would be useful to see the output of the following:
straight-version
commandemacs-version
commandM-x straight-get-recipe org
list-load-path-shadows
commandThanks. I did not see the straight buffer but here it is:
`
2021-11-17 13:49:52
darwin
prerelease (HEAD -> master, origin/master, origin/HEAD) af5437f 2021-09-27
GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.5.0, NS appkit-2022.50 Version 11.4 (Build 20F71)) of 2021-06-18
It looks like org version is 9.5 but when i check the version with
M-x org-version`, it shows 9.4.4
` Org mode version 9.4.4 (release_9.4.4 @ /Users/homemac/.emacs.d/straight/build/org/)
`
You may have the pre-installed version of Org loaded. What do you get if you M-x locate-library org?
Library is file /usr/local/Cellar/emacs-plus@28/28.0.50/share/emacs/28.0.50/lisp/org/org.el.gz
looks like it. how do I uninstall it and set it up to use the version from straight?
You don't need to uninstall it. You just need to load the version you want to use first. What's probably happening is you're unintentionally loading the built-in version in your init file prior to the use-package declaration for Org. Try adding the following toward the beginning of your init file and launching Emacs from the command line with the --debug-init
option. A backtrace buffer should pop up after Org is loaded and it will tell you what loaded it.
(eval-after-load "org" '(debug))
Thank you. I moved org installation/setup to be right after straight setup and the correct version shows but I am getting the following error messages shown in the screenshot below. Strangly, if I remove org folder from straight/build directory and restart emacs, straight reinstalls org the error goes away but as soon as I restart emacs, the error comes back.
That could be stale byte-code or a bug with Org. I suggest rebuilding all of those packages (you can remove their respective straight/build dirs if you want to be entirely sure that nothing is leftover) to see if that fixes the issue. If not, I would file a bug report on the Org development list. I don't think the issue is with straight here, so I'm closing this report for now. If you find more information that makes you think otherwise, feel free to comment and we can re-open if needed.
The only thing is I do not have these errors when I use use-package and only when I use straight but I hear you. Thank you very much for your time and inputs.
When you use use-package
without straight integration, e.g.
(use-package org :straight nil)
You are loading the built-in version of Org. Did you try the byte-code troubleshooting steps in my last comment?
Yeah, I deleted the files from straight/build dir and it rebuilt them but as soon as I restart emacs, the errors returned.
If you have your init file uploaded somewhere, I can look it over to diagnose this.
Hi @progfolio,
Sorry, I am just noticing your last message. Unfortunately, I do not have my init file uploaded anywhere on the web. I will send it to you privately if that works for you.
Thank you
@progfolio, I sent the init to your email at proton. Please let me know if you got it because I am not sure if that email belongs to you or if you still have access to that account. If not, let me know how I can send the file to you.
Instead of commenting out blocks of code (e.g. your use-package ane melpa src blocks), you can specify :tangle no
for the src block.
https://orgmode.org/manual/Extracting-Source-Code.html
I recommend uncommenting this and you'll want to move it before the bootstrap snippet:
;;(setq straight-repository-branch "develop")
The develop branch is where bugs are fixed first.
This looks suspicious to me. Setting the major-mode default to org-mode may cause it to load early if an elisp program creates a buffer (which happens frequently).
(setq-default major-mode 'org-mode)
(defun my/new-buffer-frame ()
"Create a new frame with a new empty buffer."
(interactive)
(let ((buffer (generate-new-buffer "untitled")))
(set-buffer-major-mode buffer)
(display-buffer buffer '(display-buffer-pop-up-frame . nil))))
Why not just activate Org-mode in the buffer instead of globally setting the default value of major-mode?
(defun my/new-buffer-frame ()
"Create a new frame with a new empty buffer."
(interactive)
(let ((buffer (generate-new-buffer "untitled")))
(with-current-buffer buffer
(org-mode))
(display-buffer buffer '(display-buffer-pop-up-frame . nil))))
How are you tangling/loading the init file?
Thank you. I wanted to use org as the default mode but I'll revise the config and remove that option. This is the code I use to toggle the init_file
(org-babel-load-file "~/Dropbox/config.org")
Did you get to load up the config and did you see the same error messages?
org-babel-load-file
loads Org. That's why you have the built in version loaded.
Just wanted to report that by commenting out the code below, as pointed by @progfolio , the issue disappeared. Thanks very much, @progfolio for your time.
(defun my/new-buffer-frame ()
"Create a new frame with a new empty buffer."
(interactive)
(let ((buffer (generate-new-buffer "untitled")))
(set-buffer-major-mode buffer)
(display-buffer buffer '(display-buffer-pop-up-frame . nil))))
How do we install the latest version of org-mode? The current released version is 9.5 but straight is only pulling in 9.4.4. I initially thought it was my config settings so I stripped everything off my config and used the following right after setting up straight but it only installed version 9.4.4 as shown in the attached screenshort. Is there a way to ensure that the latest org-mode version is installed?
`#+begin_src emacs-lisp :results none (use-package org :straight t) (use-package org-contrib :straight t)
+end_src``