This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-10
Channels
- # announcements (3)
- # babashka (16)
- # beginners (41)
- # biff (4)
- # calva (14)
- # circleci (1)
- # clj-http (24)
- # clj-kondo (9)
- # clj-on-windows (31)
- # cljs-dev (52)
- # clojure (162)
- # clojure-australia (10)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-uk (5)
- # clojurescript (40)
- # conjure (6)
- # core-async (3)
- # cursive (5)
- # datalevin (11)
- # datomic (7)
- # emacs (12)
- # etaoin (19)
- # events (1)
- # figwheel-main (17)
- # fulcro (4)
- # graalvm (3)
- # gratitude (13)
- # honeysql (8)
- # introduce-yourself (7)
- # london-clojurians (1)
- # off-topic (9)
- # polylith (9)
- # rdf (1)
- # re-frame (21)
- # releases (5)
- # remote-jobs (4)
- # sci (28)
- # shadow-cljs (15)
- # spacemacs (2)
- # vim (4)
- # xtdb (15)
Elisp help please. Is there a recommended way to use an environment variable when setting the location of my auth-sources? It seems auth-sources wants a quoted list of values, which means pulling out the environment variable and adding the filename isnt going to be evaluated. So the following doesnt quite work...
(setq auth-sources '((concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
"~/.authinfo.gpg"))
I guess I could just use the relative locations in the list
(setq auth-sources '("~/.config/authinfo.gpg" "~/.authinfo.gpg"))
But wonder if there is a nicer approachTry:
(setq auth-sources `((concat ,(getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
"~/.authinfo.gpg"))
even simpler:
(setq auth-sources (list
(concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
"~/.authinfo.gpg"))
ah, so ,
is unquoting and therefore the concat expression evaluates to a string, nice.
I like the list approach, more obvious to me.
Thank you.
Since Emacs 26 I think, instead of (getenv "XDG_CONFIG_HOME")
you can require 'xdg package and call (xdg-config-home)
. It's basically just getenv plus a fallback to ~/.config, so probably doesn't matter much.
I recently followed this tip from HN https://blog.nilbus.com/take-the-pain-out-of-git-conflict-resolution-use-diff3/ which is how I always wanted merge conflicts to be rendered. The cool part being, Emacs already understands this diff3 format OOTB. The new part is rendered in yellow: http://www.skybert.net/graphics/2017/2017-01-04-emacs-3-way-diff-git-merge.png highly recommended
That does look nice.
Fwiw, I've always used ediff in emacs from a magit status buffer and it's similar to what you're showing but it also has each version in a separate buffer. I use n
and p
to go to the previous/next conflict and choose a
(local), b
(remote) or c
(ancestor).
Haven't used smerge though so not sure if I'm missing out on something...
@U45T93RA6 so if I set
git config --global merge.conflictstyle diff3
then Emacs will show the common ancestor automatically when I have a merge conflict in magit?
Or is there something else needed?So is the screenshot an example of ediff? Or something in the Emacs version control?
diff3 format shows in Magit status once merge.conflictstyle diff3 is set in the git config, nice