Using latest version of org-mode

The 9.4.4 version that comes with Emacs conflicts with a newer version
I install. This is because I need org before I tangle my files.

So, I've moved the straight and `(use-package org)` code to the
`init.el` file, and then the rest of the system comes right up with
the latest org, and without the conflicts.
This commit is contained in:
Howard Abrams 2022-03-03 15:16:50 -08:00
parent 44cea4add4
commit 1ba0447921
4 changed files with 54 additions and 22 deletions

View file

@ -25,11 +25,12 @@ A literate programming file for bootstraping my Emacs Configuration.
* Introduction * Introduction
This file contains all the variable definitions and library loading for the other files in my project. This file contains all the variable definitions and library loading for the other files in my project.
** Straight Package Installer ** Straight Package Installer
I'm going to be installing everything using the [[https://github.com/raxod502/straight.el#getting-started][straight.el]] for package installation and management. Here is the initialization/installation for it: I'm going to be installing everything using the [[https://github.com/raxod502/straight.el#getting-started][straight.el]] for package installation and management. However, before I could tangle these org files, I needed to have =straight= grab the latest =org=, so the following initialization code is actually in [[file:initialize][initialize]], but the good stuff is:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(defvar bootstrap-version) (defvar bootstrap-version)
(let ((bootstrap-file
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5)) (bootstrap-version 5))
(unless (file-exists-p bootstrap-file) (unless (file-exists-p bootstrap-file)
@ -42,11 +43,13 @@ I'm going to be installing everything using the [[https://github.com/raxod502/st
(load bootstrap-file nil 'nomessage)) (load bootstrap-file nil 'nomessage))
#+END_SRC #+END_SRC
Let's get the Straight project working with =use-package=: Let's get the Straight project working with =use-package=:
#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp :tangle no
(straight-use-package 'use-package) (straight-use-package 'use-package)
#+END_SRC #+END_SRC
While that enables the =:straight t= extension to =use-package=, let's just have that be the default: While that enables the =:straight t= extension to =use-package=, let's just have that be the default:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(use-package straight (use-package straight
:custom (straight-use-package-by-default t :custom (straight-use-package-by-default t
straight-default-vc 'git)) straight-default-vc 'git))

View file

@ -118,12 +118,12 @@ Now that headers are noticeable, I have no reason to see a number of asterisks.
:straight (:type git :protocol ssh :host github :repo "integral-dw/org-superstar-mode") :straight (:type git :protocol ssh :host github :repo "integral-dw/org-superstar-mode")
:hook (org-mode . org-superstar-mode) :hook (org-mode . org-superstar-mode)
:init :init
(setq org-superstar-headline-bullets-list '("▶") (setq ; org-superstar-headline-bullets-list '("▶")
org-superstar-special-todo-items nil org-superstar-special-todo-items nil
org-superstar-todo-bullet-alist t org-superstar-todo-bullet-alist t
org-superstar-prettify-item-bullets t org-superstar-prettify-item-bullets t
org-superstar-item-bullet-alist '((42 . "") ; * org-superstar-item-bullet-alist '((42 . "") ; *
(43 . "") ; + (43 . "") ; +
(45 . "•")))) (45 . "•"))))
#+END_SRC #+END_SRC
@ -152,7 +152,7 @@ Since the following code does not work like I would have expected:
#+END_SRC #+END_SRC
I add a hook to standard Org, and since this is a Lisp-2, I can get away with: I add a hook to standard Org, and since this is a Lisp-2, I can get away with:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp :tangle no
(defun org-hide-leading-stars () (defun org-hide-leading-stars ()
(let* ((keyword (let* ((keyword
`(("^\\(\\*+ \\)\\s-*\\S-" ; Do not hide empty headings! `(("^\\(\\*+ \\)\\s-*\\S-" ; Do not hide empty headings!

View file

@ -26,7 +26,6 @@ A literate programming file for configuring org-mode and those files.
Org is a /large/ complex beast with a gazillion settings, so I discuss these later in this document. Org is a /large/ complex beast with a gazillion settings, so I discuss these later in this document.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org (use-package org
;; :straight (:type built-in) ; Use with problems from 9.4.4 version
:mode ("\\.org" . org-mode) ; Addresses an odd warning :mode ("\\.org" . org-mode) ; Addresses an odd warning
:init :init
<<variables>> <<variables>>
@ -91,6 +90,7 @@ Org is an important part of my Emacs world, and with a lot of customization (eve
org-src-fontify-natively t org-src-fontify-natively t
org-src-tab-acts-natively t) org-src-tab-acts-natively t)
#+END_SRC #+END_SRC
* Configuration Section * Configuration Section
I pretend that my org files are word processing files that wrap automatically: I pretend that my org files are word processing files that wrap automatically:
#+NAME: visual-hook #+NAME: visual-hook

View file

@ -4,7 +4,7 @@
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
HAMACS_DIR=$(cd "$(dirname "$0")"; pwd) HAMACS_DIR=$(cd "$(dirname "$0")"; pwd)
HAMACS_DEST=$HOME/.emacs.hamacs # A symlink to ~/.emacs.d HAMACS_DEST=$HOME/.emacs.d
mkdir -p $HAMACS_DEST mkdir -p $HAMACS_DEST
@ -44,6 +44,35 @@ cat > $HAMACS_DEST/init.el <<EOF
(setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH"))) (setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH")))
(defvar hamacs-source-dir "$HAMACS_DIR" "Where we be.") (defvar hamacs-source-dir "$HAMACS_DIR" "Where we be.")
;; Configure straight https://github.com/raxod502/straight.el#getting-started
(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))
(straight-use-package 'use-package)
;; While that enables the :straight t extension to use-package, let's just have that be the default:
(use-package straight
:custom (straight-use-package-by-default t
straight-default-vc 'git))
;; See the details in https://dev.to/jkreeftmeijer/emacs-package-management-with-straight-el-and-use-package-3oc8
;; Download and use the latest version of org:
(use-package org) ; We'll configure this in ernest later.
;; Let's rock: ;; Let's rock:
(org-babel-load-file "$HAMACS_DIR/bootstrap.org") (org-babel-load-file "$HAMACS_DIR/bootstrap.org")