Fork me on GitHub

spacemacs tends to lockup daily for me, mostly when i’m connected to a repl


sometimes I get lost on what I've opened and what's currently running. So I just quit & restart ^^


I keep mine going for a while because I've gotten used to layouts and can't reliably restore a layout across a restart. Specifically, I have an exocortex layer with all my org files as well as the *Org Agenda* buffer. But that buffer isn't tied to a file, so Spacemacs can't open it automatically upon start or upon layer load.


why don't you modify org layout, so the files you need will open automatically when you do spc l o o


Hmm, I didn't know about SPC l o o…interesting. It took me a while to find any documentation for it. The manual says: > Custom perspective containing all the =org-agenda= buffers Do you know what "org-agenda buffers" are? Does it mean all of the files in the org-agenda-files variable? Because it only ever seems to open my file, whereas the variable also has my file in it.


yes, mine is set to (setq org-agenda-files "~/org/.agenda-files") it's a file where I list all my files that I want to contribute to the agenda, whenever I open agenda ALL those files get open automatically


yeah, custom layouts are dope, so for example, just a few days ago I realized that I keep creating a layout for the project I've been working on. So I did this:

(spacemacs|define-custom-layout "@finops-admin"
    :binding "f"
    :body (find-file "~/DevProjects/finops-admin/project.clj"))
now, every time I do spc l o f - it jumps to my project layout. niiiice


I had org-agenda-files set properly, but with a list instead of a file. I changed it to be a file like yours, but the layout still doesn't open both of the files I have listed in the file. It opens the first file then stops. If I swap the first and second lines, the new first one is the one opened. In that layout, no other buffers are listed with SPC b b. Nothing is printed in *Messages*. Dunno what the problem is, but oh well… Might have to look into custom layouts. Maybe that would solve my problem here. Thanks!


it is strange that it wouldn't open files in agenda list


are they in a single dir or scattered?


what org-directory is set to?


A single directory, and indeed, they're all in the same directory as what org-directory is set to.


maybe something wrong with the one of the files? try unleashing org-lint on them. yup, that is a thing


Ooh, I'll try that!


A couple of warnings about unknown fuzzy locations (probably because I archived some items that there were links targeting), but nothing major for either file. Good guess though!


Current uptime: 7 days.


Does anyone know how to tweak auto-highlight-symbol.el so when I do * while cursor on foo, it would select everything "foo-related", :foo, ::foo/bar, foo/bar, zap/foo ?


@ag, oh yes, tweaking * is very high on my list of things I'm missing in spacemacs (or — more likely — haven't discovered the right option for yet)


interestingly I have discovered this yesterday. if you press * and it won't show any symbols (since it won't recognize :foo, foo/bar, etc.) but then, you press esc, and then n - it suddenly shows them (like if you do search with / vim command




it's not ideal, but it kinda works


I would love though to find a more "natural" fix to this problem, then toggling SPC t h a - would work too


digging more into this problem I realized a few things: 1) CIDER guys have an open ticket And it doesn't seem to be of high priority. Also I doubt that will work with Spacemacs out of the box. AFAIK none of the CIDER maintainers use Spacemacs 2) auto-highlight-symbol.el being published on MELPA is the fork of very old and kinda outdated package, and clojure is not in the list of "officially" supported modes. see ahs-modes var 3) Maybe one needs to tweak ahs-default-symbol-regexp. I tried to figure out correct regexp, but I have failed


it's infuriating close to being super useful, but the last missing 20% break it for me


essentially you want to tweak what * considers word boundaries, right?


Re: the uptime discussion: it’s interesting that you guys update often. I usually don’t like restarting because of the overhead it requires to get my repl back to a productive state, meaning I have lots of let expressions I need to run as well as defs mocking config input


BTW, thank you guys for upvotting the small PR to improve g d for clojure modes. It's now merged on develop branch and it jumps to definition (even if you don't have CIDER running). But. CIDER guys just added C-C C-: for keywords. But that binding is soooo inconvenient. You have to: a) realize you want to search for keyword b) you have to hold Ctrl, then press C, then hold Ctrl with Shift and press ; - completely awful so I'm thinking this can be improved and baked into g d...


Although the binding is inconvenient (I'm glad at least we have that now) - unlike Cursive users


Damn it, I don't understand why this:

M-x clj-find-usages

To perform this op the project needs to be evaluated.
  Analyzing a large project might take a while: hit C-g to abort.
  (Set cljr-warn-on-eval to nil to analyze the project without warning)
  Do you want to proceed? (y or n) y
error in process filter: cljr--maybe-rethrow-error: Only .clj files are supported!
Only .clj files are supported! But why? What's the semantic difference between .cljs, .clj and .cljc in this case? sigh... I guess I will never be able to tell my Cursive using colleague that CIDER is better


IIRC (questionable in this case), there's an open issue or comment thread somewhere talking about what it would take to do the generalization to cljc + cljs, and it didn't look all that huge for most of it. Probably just a matter of someone committing some time to it.


#72 looks probably outdated.


I got a glance at some of that when I worked on , but it was pretty tangential.


> Probably just a matter of someone committing some time to it sigh... if only I wasn't so lazy and stupid. Alas I'm all of those things


Right there with you 😄


Or: busy and imperfect, on my good days 😉


any good workflow for 1.9 cli in spacemacs? I can't even get it running inside eshell


also, what is the quickest way to change [...] to {...} ? such as paren-surround shotcuts?


c-hange s-urrounding [-square brace }-to curly brace


note that the direction of the second brace actually matters, the opening brace/paren version (so [{() leaves a space


the closing brace/paren does not leave a space


the plugin is called evil-surround and is based on tpope's vim-surround if you need googleable things


perfect, works


do you guys have any thoughts on literate programming? I’m currently exploring the idea of writing code in org mode files, as a way to organize my thoughts or provide a way to keep notes and thoughts organized as I move through code writing


I personally think literate programming generally is a bad idea. Unless you have a personality disorder and your second personality calls himself Professor Donald Knuth and wants to write series of books about programming


However... there are cases where org-mode's babel is sooooo dope. I love it


what makes you say that ag?


and what use cases do you have where babel is so dope?


I use it to manage my dotfiles...


managing configuration of ALL the stuff on my machine is in a single file now, and it's documented and it can even encrypt things


like putting sensitive stuff in ~/.authinfo.gpg. And you can use the same mechanism of restoring config from a backup on all the systems (in my case linux and osx)


Also org-mode is perfect way to use for showcasing/testing/documenting an API


using restclient you can on the fly poke remote endpoints


wow those are both really cool ideas


I have seen demos of people using org mode for their .spacemacs


yeah, I've seen people having their entire emacs configs in a single .org file


using org-mode for my dotfiles finally made me stop worrying about things scattered across my machines. Nothing else I tried before made it so simple yet very flexible. One day my work laptop has died. I've given a new machine. It took me like ten minutes to get everything restored back as I had on my previous.


so do you have babel tangle to a bunch of different files then?


and you can "stich" files together with multiple things. For example you can have section * public git where you tangle into /.gitconfig and then section * private where you still tangle into /.gitconfig, but this time more sensitive stuff


you can do it for different machines like this:

#+begin_src gitconfig :tangle (when (eq system-type 'darwin) "~/.gitconfig")
      program = /usr/local/MacGPG2/bin/gpg2
  #+begin_src gitconfig :tangle (when (eq system-type 'gnu/linux) "~/.gitconfig")
      program = /usr/bin/gpg2


if you need to create nested directories and then a file, you can use :mkdirp yes

#+begin_src  sh :tangle (when (eq system-type 'darwin) "~/.gnupg/gpg-agent.conf")  :mkdirp yes
    pinentry-program /usr/local/MacGPG2/libexec/


you can encrypt things:

#+begin_src emacs-lisp :tangle ~/.authinfo.gpg
# -*- epa-file-encrypt-to: ("") -*-

machine  login agzam^magithub password MYPASS
machine  login ilemming force yes password MYPASS



I hadn't thought about putting everything in one file. I've seen other people rewriting their .spacemacs file into org and I didn't really understand the point, but the idea of having one master file to handle all of my dotfiles is incredibly appealing


you can always split things into multiple files. Org can "include" other files


and it will still have a single "entrypoint" from where you run babel-tangle


I just have a ton of configs everywhere and I recently got a new machine and realized that my dotfiles were not up to par


I still don't have the new machine setup correctly


Oh, my dotfile is like 3000 lines or something. And I always know where things are


phew that’s intense hahah


too bad I can't share it - it has way too much to reveal


how did you learn about using babel ag?


and maybe you can try to anonymize it? that would be super helpful


> how did you learn about using babel ag? there's not much to learn. Just create an .org file, add some source blocks something like I showed above, run M-x org-babel-tangle and voila


the only thing I couldn't figure out is how to set the correct permissions after the files get created. I kinda did it with a hacky workaround - an elisp function and post-babel-tangle hook


I wish there was a simpler way though


Here's an example of using org-mode for emacs config.


Haven't gone down that path myself.


and guys, totally check this thing out... it's amaaazing...


and guess what? the only thing you need to do is to add restclient layer


what did do you to the configs of all of the apps? Was that annoying to change so that the dotfiles was all this one file?


au contraire, having it in a single file is absolutely cool sorry, got the question wrong: no, it wasn't very difficult to gather things. You can do it piecemeal way - just every single time you want to change config of anything on the machine, instead of doing it directly in a related file, do it in your


it's easier to find things, easier to manage the changes - "diffing"


easier to update things


it's kinda close to Clojure's core philosophy - your entire machine's configuration is immutable


every time you do org-babel-tangle, you unroll new configuration


that makes a lot of sense


do you use your org mode file to create all the configs?




I hope you see how awesome babel is. Now to the sad part. Unfortunately, it's kind of PITA to make it work with Clojure. And even more so with Clojurescript. I've been thinking about finding a way to make it work with Lumo and create something like ob-lumo.el or whatever


but again. I'm not just stupid or lazy. I'm both of those things ;(


that’s super cool, thanks for showing us babel. I’m glad this whole conversation kicked off!


also you never explained your distaste for literate programming, it seems like it makes sense!


well, literate programming I think is not suitable to solve business problems.


that makes sense. I’m really more interested in it for myself though. There’s always a big difference between OSS / personal programming and professional code writing


I mean it's probably possible to use org-babel in a small team where everyone agree's to use it. And manage documentation/tests in that format


but that's very unusual and it makes hard to replace team members if they decide to leave.


but one may argue - same is true for Clojure, or any piece of tech


Org is truly amazing, but I wish it was ported outside of Emacs. Vim has flaky version of it, but that's not enough. It would've been awesome to see people using Org-mode in Atom, VSCode, Intellij


haha We are currently having that problem with our team. If you have any clojure experience, that’s a HUGE plus


Yeah Org mode really should become more of a thing in other places. However, it’s also nice that it’s a secret? of emacs users? like it’s the kind of thing that helps keep me in the emacs system and loving it


Not really. Because majority of people have no idea about existence of org, or cannot use it without learning Emacs they have to invent all sorts of markdown flavors, tools for note keeping, todo lists, blogging engines, publishing tools, etc, etc.


yeah that’s a great point. FWIW the last markdowny notes taking thing I saw on HN all of the comments were about org mode