This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-04
Channels
- # architecture (5)
- # aws (11)
- # aws-lambda (1)
- # beginners (108)
- # boot (11)
- # cider (37)
- # clara (19)
- # cljsrn (72)
- # clojure (170)
- # clojure-austin (2)
- # clojure-dev (1)
- # clojure-dusseldorf (2)
- # clojure-italy (1)
- # clojure-spec (41)
- # clojure-uk (24)
- # clojurescript (113)
- # component (2)
- # core-async (29)
- # cursive (9)
- # data-science (5)
- # datomic (72)
- # docs (23)
- # duct (61)
- # editors (1)
- # emacs (1)
- # events (5)
- # fulcro (77)
- # graphql (2)
- # hoplon (4)
- # jobs (3)
- # jobs-discuss (16)
- # leiningen (5)
- # off-topic (94)
- # onyx (37)
- # precept (5)
- # re-frame (17)
- # reagent (11)
- # shadow-cljs (18)
- # spacemacs (107)
- # specter (3)
- # unrepl (64)
- # yada (1)
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. niiiiceI 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!
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
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 https://github.com/clojure-emacs/cider/issues/1461
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 def
s 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 betterIIRC (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.
One of these, maybe? https://github.com/clojure-emacs/clj-refactor.el/issues/72 https://github.com/clojure-emacs/clj-refactor.el/issues/191
I got a glance at some of that when I worked on https://github.com/clojure-emacs/clj-refactor.el/issues/394 , 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
also, what is the quickest way to change [...] to {...} ? such as paren-surround shotcuts?
note that the direction of the second brace actually matters, the opening brace/paren version (so [{(
) leaves a space
the plugin is called evil-surround
and is based on tpope's vim-surround
if you need googleable things
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
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)
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.
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 /.gitconfig, but this time more sensitive stuff* private
where you still tangle into
you can do it for different machines like this:
#+begin_src gitconfig :tangle (when (eq system-type 'darwin) "~/.gitconfig")
[gpg]
program = /usr/local/MacGPG2/bin/gpg2
#+end_src
#+begin_src gitconfig :tangle (when (eq system-type 'gnu/linux) "~/.gitconfig")
[gpg]
program = /usr/bin/gpg2
#+end_src
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/pinentry-mac.app/Contents/MacOS/pinentry-mac
#+end_src
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
#+end_src
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
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
> 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
Here's an example of using org-mode for emacs config. https://github.com/cndreisbach/emacs.d
Haven't gone down that path myself.
and guys, totally check this thing out... it's amaaazing... https://github.com/zweifisch/ob-http
Oh nice!
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 http://dotfile.org
it's kinda close to Clojure's core philosophy - your entire machine's configuration is immutable
:thinking_face:
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
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!
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.
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