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,28 +25,31 @@ A literate programming file for bootstraping my Emacs Configuration.
* Introduction
This file contains all the variable definitions and library loading for the other files in my project.
** 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
(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))
#+BEGIN_SRC emacs-lisp :tangle no
(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))
#+END_SRC
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)
#+END_SRC
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
:custom (straight-use-package-by-default t
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")
:hook (org-mode . org-superstar-mode)
:init
(setq org-superstar-headline-bullets-list '("▶")
(setq ; org-superstar-headline-bullets-list '("▶")
org-superstar-special-todo-items nil
org-superstar-todo-bullet-alist t
org-superstar-prettify-item-bullets t
org-superstar-item-bullet-alist '((42 . "") ; *
(43 . "") ; +
org-superstar-item-bullet-alist '((42 . "") ; *
(43 . "") ; +
(45 . "•"))))
#+END_SRC
@ -152,7 +152,7 @@ Since the following code does not work like I would have expected:
#+END_SRC
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 ()
(let* ((keyword
`(("^\\(\\*+ \\)\\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.
#+BEGIN_SRC emacs-lisp
(use-package org
;; :straight (:type built-in) ; Use with problems from 9.4.4 version
:mode ("\\.org" . org-mode) ; Addresses an odd warning
:init
<<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-tab-acts-natively t)
#+END_SRC
* Configuration Section
I pretend that my org files are word processing files that wrap automatically:
#+NAME: visual-hook

View file

@ -4,7 +4,7 @@
# ----------------------------------------------------------------------
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
@ -44,6 +44,35 @@ cat > $HAMACS_DEST/init.el <<EOF
(setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH")))
(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:
(org-babel-load-file "$HAMACS_DIR/bootstrap.org")