Figured out the gpg bug
I needed to have a loopback setting to have it prompt for a password inside Emacs, as opposed to running a GUI GPG, or worse, spitting out an error.
This commit is contained in:
parent
55249bad44
commit
6a88d5e138
1 changed files with 35 additions and 10 deletions
|
@ -22,34 +22,60 @@ A literate programming file for configuring Emacs.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Introduction
|
* Basic Configuration
|
||||||
New way to display line-numbers. I set mine to =relative= so that I can easily jump up and down by that value. Set this to =nil= to turn off, or =t= to be absolute.
|
New way to display line-numbers. I set mine to =relative= so that I can easily jump up and down by that value. Set this to =nil= to turn off, or =t= to be absolute.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq display-line-numbers t)
|
(setq display-line-numbers t
|
||||||
(setq display-line-numbers-type 'relative)
|
display-line-numbers-type 'relative)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
As [[https://tecosaur.github.io/emacs-config/config.html][tec wrote]], I want to use =~/.authsource.gpg= as I don’t want to accidentaly purge this file cleaning =~/.emacs.d=, and let's cache as much as possible, as my home machine is pretty safe, and my laptop is shutdown a lot.
|
As [[https://philjackson.github.io//emacs/backups/2022/01/31/keeping-backups-of-every-edited-file/][Phil Jackson]] mentioned, Emacs has a lot of file backup strategy, and either change the [[help:backup-directory-alist][backup-directory-alist]] to put individual file backups elsewhere, e.g.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
|
(setq backup-directory-alist `(("." . "~/.backups")))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Or leave them in the current directory, but create an alias to =ls= to normally not see them, e.g.
|
||||||
|
|
||||||
|
#+BEGIN_SRC sh
|
||||||
|
alias ls="ls --color=auto --hide='*~'"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
I'm leaving them side-by-side, but I am keeping some extra copies:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq auto-save-default t
|
||||||
|
delete-old-versions t
|
||||||
|
kept-new-versions 6
|
||||||
|
kept-old-versions 2
|
||||||
|
version-control t)
|
||||||
|
#+END_SRC
|
||||||
|
The [[help:version-control][version-control]] variable affect backups (not some sort of global VC setting), this makes numeric backups.
|
||||||
|
|
||||||
|
As [[https://tecosaur.github.io/emacs-config/config.html][tec wrote]], I want to use =~/.authsource.gpg= as I don’t want to accidentaly purge this file cleaning =~/.emacs.d=, and let's cache as much as possible, as my home machine is pretty safe, and my laptop is shutdown a lot. Also, as [[https://www.bytedude.com/gpg-in-emacs/][bytedude]] mentions, I need to se the =epa-pineentry-mode= to =loopback= to actually get a prompt for the password, instead of an error.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq auth-sources '("~/.authinfo.gpg")
|
(use-package epa-file
|
||||||
auth-source-cache-expiry nil)
|
:config
|
||||||
|
(defvar epa-pinentry-mode)
|
||||||
|
(setq epa-file-select-keys nil
|
||||||
|
epa-pinentry-mode 'loopback
|
||||||
|
auth-sources '("~/.authinfo.gpg")
|
||||||
|
auth-source-cache-expiry nil))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
More settings:
|
More settings:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq truncate-string-ellipsis "…" ; Unicode ellispis are nicer than "..."
|
(setq truncate-string-ellipsis "…" ; Unicode ellispis are nicer than "..."
|
||||||
auto-save-default t
|
|
||||||
debug-on-error t)
|
debug-on-error t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
And some Mac-specific settings:
|
And some Mac-specific settings:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when (ha-running-on-macos?)
|
(when (ha-running-on-macos?)
|
||||||
(setq mac-option-modifier 'meta)
|
(setq mac-option-modifier 'meta
|
||||||
(setq mac-command-modifier 'super)
|
mac-command-modifier 'super)
|
||||||
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
|
(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
|
||||||
(add-to-list 'default-frame-alist '(ns-appearance . dark)))
|
(add-to-list 'default-frame-alist '(ns-appearance . dark)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -1179,7 +1205,6 @@ Pushing directly to the upstream branch is /bad form/, as one should create a pu
|
||||||
*** EWW
|
*** EWW
|
||||||
Web pages look pretty good with EWW, but I'm having difficulty getting it to render a web search from DuckDuck.
|
Web pages look pretty good with EWW, but I'm having difficulty getting it to render a web search from DuckDuck.
|
||||||
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package eww
|
(use-package eww
|
||||||
:init
|
:init
|
||||||
|
|
Loading…
Reference in a new issue