Skip to content

Latest commit

 

History

History
206 lines (196 loc) · 11.3 KB

File metadata and controls

206 lines (196 loc) · 11.3 KB

building emacs from source

First download the code (could git clone https://git.savannah.gnu.org/git/emacs.git or use a release tarball)

in that directory run autogen.sh if it is a git checkout

Then run a command like this:

./configure PKG_CONFIG_PATH='/path/to/individual/pkgconfig:/path/to/another/pkgconfig' CPPFLAGS='-I/path/to/pkg/include' LDFLAGS='-O2 -L/path/to/package/lib' CFLAGS='-O2 -march=native' --prefix=/path/to/install_dir --with-cairo --with-harfbuzz --with-modules --with-native-compilation=aot --with-tree-sitter --with-x-toolkit=gtk3

followed by make -j$(nproc) and make install

Then commands like these can be helpful to recompile installed packages and kick off native compilation

(package-recompile-all)
(native-compile-async package-user-dir t)

dir-locals

use ((nil . ((buffer-read-only . t)))) per this stack exchange to open in read-only for reference sub-directories

custom info manuals

per this blogpost from this reddit post the snippet (add-to-list 'Info-additional-directory-list "/path/to/your/texinfo") can go along with use-package info to point to a custom make texinfo manual from something using sphinx documentation rather than copying a stale dir file from some package, just update it with install-info after the .info file gets created

cd ~/development
git clone https://github.com/python/cpython.git
cd cpython/Doc
make venv # if you dont have sphinx-build and friends
make texinfo
(cd build/texinfo && make)
mkdir -p ~/.texinfo/python
rsync -avz build/texinfo/* ~/.texinfo/python/
install-info --dir-file="$HOME/.texinfo/python/dir" "$HOME/.texinfo/python/<manual>.info" # replace <manual>.info with the top-level info file that got built

org settings for a good research notebook

:PROPERTIES:
#+TITLE: some title
#+PROPERTY: header-args:R :session *R:topic:* :eval never-export :exports code
#+PROPERTY: header-args:python :session *Python[topic]* :eval never-export :exports code
#+EXPORT_EXCLUDE_TAGS: noexport
#+OPTIONS: num:nil
#+OPTIONS: ^:nil
#+OPTIONS: toc:nil
#+OPTIONS: tex:dvisvgm
#+EXCLUDE_TAGS: noexport
#+EXPORT_FILE_NAME: README.md
:END:

emacs reference configs

a compiled list: https://github.com/caisah/emacs.dz

declare -A repos=(
    ["https://github.com/bnbeckwith/bnb-emacs.git"]="bnbeckwith"
    ["https://github.com/howardabrams/hamacs.git"]="hamacs"
    ["https://github.com/chrisbarrett/.emacs.d.git"]="chrisbarrett"
    ["https://github.com/skeeto/.emacs.d.git"]="skeeto"
    ["https://github.com/a13/emacs.d.git"]="a13"
    ["https://github.com/IQSS/IQSS.emacs.git"]="IQSS"
    ["https://github.com/IvanMalison/dotfiles.git"]="IvanMalison"
    ["https://github.com/incandescentman/Emacs-Settings.git"]="incandescentman"
    ["https://github.com/joedicastro/dotfiles.git"]="joedicastro"
    ["https://github.com/jwiegley/dot-emacs.git"]="jwiegley"
    ["https://github.com/joodie/emacs-literal-config.git"]="joodie"
    ["https://github.com/magnars/.emacs.d.git"]="magnars"
    ["https://github.com/MatthewZMD/.emacs.d.git"]="MatthewZMD"
    ["https://github.com/NicolasPetton/emacs.d.git"]="NicolasPetton"
    ["https://gitlab.com/protesilaos/dotfiles.git"]="protesilaos"
    ["https://github.com/raxod502/radian.git"]="raxod502"
    ["https://github.com/DarwinAwardWinner/dotemacs.git"]="DarwinAwardWinner"
    ["https://github.com/sachac/.emacs.d.git"]="sachac"
    ["https://github.com/purcell/emacs.d.git"]="purcell"
    ["https://github.com/rememberYou/.emacs.d.git"]="rememberYou"
    ["https://github.com/xiongtx/.emacs.d.git"]="xiongtx"
    ["https://github.com/tecosaur/emacs-config.git"]="tecosaur"
    ["https://github.com/daviwil/emacs-from-scratch.git"]="daviwil"
    ["https://github.com/jakebox/jake-emacs.git"]="jakebox"
    ["https://github.com/Eason0210/dot-emacs.git"]="eason0210"
    ["https://github.com/DiamondBond/emacs.git"]="diamondbond"
    ["https://github.com/bbatsov/prelude.git"]="prelude"
    ["https://gitlab.com/skybert/my-little-friends.git"]="skybert"
    ["https://github.com/redguardtoo/emacs.d.git"]="redguardtoo"
    ["https://github.com/xuchunyang/emacs.d.git"]="xuchunyang"
    ["https://github.com/DamienCassou/emacs.d.git"]="DamienCassou"
    ["https://github.com/dakra/dmacs.git"]="dakra"
    ["https://github.com/PythonNut/quark-emacs.git"]="PythonNut"
    ["https://github.com/jordonbiondo/.emacs.d.git"]="jordonbiondo"
    ["https://github.com/cute-jumper/.emacs.d.git"]="cutejumper"
    ["https://github.com/waymondo/hemacs.git"]="waymondo"
    ["https://github.com/novoid/dot-emacs.git"]="novoid"
    ["https://github.com/kaushalmodi/.emacs.d.git"]="kaushalmodi"
    ["https://github.com/expez/.emacs.d.git"]="expez"
    ["https://github.com/matthewbauer/bauer.git"]="matthewbauer"
    ["https://github.com/Fuco1/.emacs.d.git"]="Fuco1"
    ["https://github.com/alhassy/emacs.d.git"]="alhassy"
    ["https://github.com/nathantypanski/emacs.d.git"]="nathantypanski"
    ["https://github.com/abo-abo/oremacs.git"]="aboabo"
    ["https://github.com/kuanyui/.emacs.d.git"]="kuanyui"
    ["https://github.com/karthink/.emacs.d.git"]="karthink"
    ["https://github.com/HannesHaglund/my-emacs.git"]="hannes"
    ["https://github.com/zoliky/dotemacs.git"]="zoliky"
    ["https://github.com/justinbarclay/.emacs.d.git"]="justinbarclay"
    ["https://github.com/fbkarsdorp/.emacs.d.git"]="fbkarsdorp"
    ["https://gitlab.com/bkhl/dotfiles.git"]="bkhl"
    ["https://github.com/frap/emacs-literate.git"]="frap"
    ["https://github.com/mxco86/emacs-config.git"]="mxco86"
    ["https://github.com/legoscia/dotemacs.git"]="legoscia"
    ["https://github.com/thierryvolpiatto/emacs-config.git"]="thierryvolpiatto"
    ["https://github.com/mrvdb/emacs-config.git"]="mrvdb"
    ["https://codeberg.org/vifon/emacs-config.git"]="vifon"
    ["https://git.sr.ht/~northyear/dotemacs"]="northyear"
    ["https://github.com/zsxh/emacs.d.git"]="zsxh"
    ["https://github.com/skyler544/rex.git"]="skyler544"
    ["https://github.com/rdbeni0/emacs.d.git"]="rdbeni0"
    ["https://github.com/jackkamm/.emacs.d.git"]="jackkamm"
    ["https://github.com/amno1/.emacs.d.git"]="amno1"
    ["https://github.com/benjamin-asdf/dotfiles.git"]="benjamin-asdf"
    ["https://github.com/garyo/emacs-config.git"]="garyo"
    ["https://github.com/munen/emacs.d.git"]="munen"
    ["https://github.com/condy0919/.emacs.d.git"]="condy0919"
    ["https://github.com/oantolin/emacs-config.git"]="oantolin"
    ["https://github.com/jcs-emacs/jcs-emacs.git"]="jcs-emacs"
    ["https://github.com/rileyrg/Emacs-Customisations.git"]="rileyrg"
    ["https://github.com/casouri/lunarymacs.git"]="casouri"
    ["https://github.com/jimenezrick/emacs.d.git"]="jimenezrick"
    ["https://github.com/bunnylushington/dot-emacs-v29.git"]="bunnylushington"
    ["https://github.com/gopar/.emacs.d.git"]="gopar"
    ["https://gitlab.com/Clsmith1/dotfiles.git"]="clsmith1"
    ["https://github.com/yantar92/emacs-config.git"]="yantar92"
    ["https://gitlab.com/taonaw/taonah.git"]="taonah"
    ["https://github.com/xenodium/dotsies.git"]="xenodium"
    ["https://github.com/ericdallo/dotfiles.git"]="ericdallo-dotfiles"
    ["https://github.com/doomemacs/doomemacs.git"]="doomemacs"
    ["https://github.com/hlissner/.doom.d.git"]="hlissner-doom-private"
    ["https://github.com/syl20bnr/spacemacs.git"]="spacemacs"
    ["https://github.com/seagle0128/.emacs.d.git"]="centaur-emacs"
    ["https://github.com/jamescherti/minimal-emacs.d.git"]="minimal-emacs.d"
    ["https://github.com/ashton314/emacs-bedrock.git"]="emacs-bedrock"
    ["https://github.com/MiniApollo/kickstart.emacs.git"]="kickstart.emacs"
    ["https://github.com/caisah/emacs.dz.git"]="emacs.dz"
    ["https://github.com/emacs-tw/awesome-emacs.git"]="awesome-emacs"
    ["https://github.com/enzuru/.emacs.d.git"]="enzuru"
)

mkdir -p ~/development/emacsRefCfgs
pushd ~/development/emacsRefCfgs &> /dev/null
for url in "${!repos[@]}"; do
    name=${repos[$url]}

    if [ ! -d "$name" ]; then
        echo "$name missing, cloning!"
        git clone $url $name
    fi
done
popd
bash ~/scripts/emacs_clones.sh
(cd ~/development/emacsRefCfgs; for d in */; do pushd "$d" >/dev/null; git reset --hard HEAD; git clean -fdx; git pull --rebase --autostash; popd >/dev/null; done)
(cd ~/development/emacsRefCfgs && for d in *; do cd $d; echo "UPDATES FOR $d"; git --no-pager log --pretty=format:"%h%x09%an%x09%ad%x09%s" --since="2 weeks ago" --no-merges -10; cd -; done)

misc

random tips

M-x apropos-user-option then a package name to see all the configurable variables

upgrading

upgrading to emacs 29 (historical)

first back things up cp -r ~/.emacs.d ~/.emacs.d.backup28To29 then upgrade sudo pacman -S emacs

made the legacy tree-sitter configuration inactive and flipped on built-in along with treesit-auto in this commit and other minor addenda in here and here

troubleshooting

general

recompiling packages refs: https://emacs.stackexchange.com/questions/72655/ https://stackoverflow.com/questions/24725778/

(package-recompile-all)

if i want to byte recompile an individual package (the t is to force)

(byte-recompile-directory (expand-file-name "gptel-20240905.1946" package-user-dir) 0 t)

and if i want to kick off native compilation across installed packages

(native-compile-async package-user-dir t)

elpy rpc errors

if you see error in process sentinel: elpy-rpc--default-error-callback type of errors just run M-x elpy-rpc-reinstall-virtualenv

historical fixes

mid may 2023 update

to fix the org error message: https://emacs.stackexchange.com/questions/70081/ the answer with 4 steps worked

for doom-modeline just wait for this commit to get to melpa: https://github.com/seagle0128/doom-modeline/commit/9d6a39f97055b6b92ea2c51decb9547bad5106dc or add the quote yourself after it updates

failed to verify signature archive-contents when refreshing package list

solution: https://stackoverflow.com/a/78553384 tldr: (setq package-check-signature nil) then M-x package-refresh-contents and install latest gnu-elpa-keyring-update

after updating gptel to 20240905.1946

was hitting transient issues, i applied this suggestion and byte recompiled gptel to work around for now. The real solution should arrive via transient as per this thread

new setup bootstrapped 20241207 on t14g5 laptop

a couple of packages didnt install correctly (no autoloads.el generated), had to rm -rf them and then install them from package menu again