This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-09
Channels
- # announcements (10)
- # aws (7)
- # babashka (28)
- # babashka-sci-dev (53)
- # beginners (11)
- # clojure (43)
- # clojure-europe (100)
- # clojure-morsels (1)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (7)
- # clojurescript (13)
- # conjure (21)
- # datalevin (3)
- # emacs (46)
- # etaoin (4)
- # events (2)
- # fulcro (36)
- # graphql (7)
- # gratitude (1)
- # interceptors (13)
- # jobs-discuss (3)
- # kaocha (13)
- # membrane (3)
- # minecraft (2)
- # nbb (8)
- # off-topic (135)
- # pathom (30)
- # podcasts-discuss (1)
- # re-frame (24)
- # releases (1)
- # shadow-cljs (26)
- # sql (16)
- # squint (6)
- # tools-deps (4)
- # xtdb (8)
I've added smart parens to emacs, but it does not seem to do anything. I think my emacs knowlage is too weak to understand what I need to do. Any help appreciated
it's always a good idea to run M-x describe-package
and learn a bit about it. Usually, package authors put some instructions in the description or the home page
Yup, read that and it took me to the wiki, which was not very helpful.
How is it not helpful? There's "Getting started section" that answers your question and even more
maybe we are looking at different doc...i did the things in getting started, (which btw give no context about what file to add things to) and still it does not work. Is there a trouble shooting section I am missing?
here are the instaructins i followed:
You can also install this as a package with M-x package-install smartparens. This package is available in melpa repository.
If you've installed smartparens as a package, you don't need to require it, as there is an autoload on smartparens-global-mode.
I installed it with: M-x package-install smartparens BTW it complained about not being able to find dash, so I ended up installing that afterward as well (though the doc indicated it should have installed automatically)
(I don't use smartparens, but usually package installation is not enough, you need to instruct emacs to load the package, activate major/minor modes etc)
my init.el file:
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . " ") t)
(package-initialize)
;; actually turn on smart parens
(smartparens-global-mode t)
(require 'smartparens-config)
; smart parentheses
(show-smartparens-mode 1)
none that I could see, i'm on a mac and starting it with an icon on the dock...is there a file to look in to see errors?
when i open a .clj file it show as major mode clojure with no minor mode listed
I see a lot of stuff about clojure, nothing about smartpar
is it possible that my init.el is not being executed?
> is it possible that my init.el is not being executed?
It could be. You can either start emacs from command line with --debug-init flag, or place elisp snippet like (message "Hello")
and see if it shows in *Messages*
buffer
Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
Blink-Cursor Electric-Indent File-Name-Shadow Font-Lock Global-Eldoc
Global-Font-Lock Line-Number Menu-Bar Mouse-Wheel Show-Paren Tool-Bar
Tooltip Transient-Mark
startng from the commandline didn't print out any errors in the terminal, it just started
opps forgot the flag...hold on
If you're new to Emacs, have you considered trying one of the "distros"? Prelude, Doom, Spacemacs? It might be a lot simpler. Things like smartparens, version-control, completion frameworks could be daunting to configure from scratch. Doom for example, makes it very easy to add and remove things like that, without getting bogged down
no diference with the flag
Seem like adding support for clojure and a parens helper should not require me to adopt and entirely different distro...i had hoped to make emacs my default for all languages (well maybe not java)
Well, without a starter kit, I gotta be honest, it's going to be a bumpy road. You should consider a starter kit, at least in the beginning. Once you learn the basics, you can always make a decision to build your own config from scratch.
@U0JEFEZH6 can you elborate on that? (use-packae)?
messages only has a single line about getting help
where have you placed your init file? https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#:~:text=Emacs%20can%20also%20look%20in,config%2Femacs%20.
~/.emacs.d/init.el
also have: ~/.emacs
should I prefer one over the other?
this is whats in .emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(dash smartparens cider clojure-mode)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
So if i read that page correctly, only one of these files will be used and my config for SP is in the wrong place
Success, moving .emacs to .emacs.sav has allowed SP to start working...Thanks!!!
This is still odd to me as my .emacs file (whgich has some config in it about clojure and sp) would seem to be needed, clearly i need to merge the two into one file, but I'm wondering if they are inconflict in some way
Those settings are related to https://www.gnu.org/software/emacs/manual/html_node/elisp/Applying-Customizations.html
and M-x describe-variable custom-file
@U040K4L8BFU IMO you should still give Prelude or Doom a try. Learning Emacs from scratch, starting with a blank page like that could be a daunting endeavor. I understand that your inner hacker may refuse to choose that path, but using a starter kit can help you learn more and much faster. I just don't want yet another person to try really hard and still give up. Emacs has way too much stuff, not only built-in features and packages but an entire world. The dull looks and seemingly uncomplicated interface of vanilla Emacs without extensions could be very deceiving.
Look at this "example config" just for smartparens alone: https://github.com/Fuco1/.emacs.d/blob/master/files/smartparens.el
Alternatively, you can use Emacs profile switcher https://github.com/plexus/chemacs2 Yes, it may sound weid, but Emacs doesn't have an easy way to run multiple configs on the same machine. With that profile switcher you can have e.g., Prelude based config and vanilla config. You can use one to learn, and another to build your own, extend and borrow ideas.
Thanks! I’ll start looking at different distros (and do more background reading)