Fork me on GitHub
#cider
<
2018-11-16
>
macroz14:11:20

Isn't the indentation in clojure-mode a bit strange that any symbol with let, when or while in it, not just in the beginning, is indented like a definition (suchas identifiers-match-when-street-name-contains-input-street-name) https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L1307

macroz14:11:55

I kind of would expect that they need to be in the beginning of the symbol (and their own word)

dpsutton14:11:13

sounds like a good improvement

macroz14:11:57

I was wondering if everyone agrees this is strange or that if there is a good reason for it

dpsutton14:11:04

throw a PR up and see what comments you get. I haven't run into this bug but that's probably true for lots of people. this makes the code objectively more correct it would seem

dpsutton14:11:28

could for sure anchor that match at the beginning

macroz14:11:10

I'll definitely try making some PRs to CIDER later

dpsutton14:11:18

that's clojure-mode just a heads up

dpsutton14:11:31

do you know where to start? I grabbed the doc for rx and it is in there

dpsutton14:11:33

>>> string-start', bos', `bot' matches the empty string, but only at the beginning of the string being matched against.

macroz14:11:05

I can hack myself some elisp but have to read up on the contribution guidelines and if there are any test setups

dpsutton14:11:06

sounds like (rx string-start (or "let"...)) might work

dpsutton14:11:20

well this channel is the place to come for questions.

macroz14:11:29

maybe there's a contribution guide for me to read?

dpsutton14:11:51

let me check

macroz14:11:56

I also have some other work that I've hacked that may be useful for others, such as slightly improved font locking

dpsutton14:11:39

there's a CONTRIBUTING.md in clojure-mode

dpsutton14:11:49

separate PRs would be very welcome

dpsutton14:11:57

do you know how to run the tests?

dpsutton14:11:07

it would be nice to add tests about what you are doing

macroz14:11:09

I'm hoping it's documented somewhere in the repo

dpsutton14:11:35

there's a makefile

dpsutton14:11:46

make test (assuming you have cask installed)

macroz14:11:24

hmm maybe there's not yet a doc for dependencies and running tests?

macroz14:11:38

maybe a good time to update the CONTRIBUTING.md

dpsutton14:11:54

the lower the barrier to contributors the better in my opinion

dpsutton15:11:07

remembering what was confusing your first time can greatly improve documentation

macroz15:11:20

I'll do a PR for that as well

macroz15:11:49

hmm master fails make test with 3 unexpected results: FAILED clojure-find-ns-test FAILED test-backtracking-let-when-while-forms FAILED test-clojure-beginning-of-defun-function

macroz15:11:16

only one of which is mine (2nd)

macroz15:11:24

trying to do RED-GREEN-REFACTOR here

macroz15:11:39

added a test for the desired functionality

macroz15:11:11

the other two are borked in master

dpsutton15:11:17

interesting

macroz15:11:42

I can investigate if it's not a know issue but that'll happen later, got to go for a bit

macroz15:11:01

thanks for the starter help, I think I'll manage well now 🙂

dpsutton15:11:46

do you have the latest code? I'm not seeing any failures

macroz15:11:32

just cloned master so unless I'm in a wrong directory...

macroz15:11:46

last commit is yours commit 71b32ee95e8ec99098e212cd0ec74cb4c002e8c6 Author: dan sutton <[email protected]> Date: Fri Oct 12 08:21:49 2018 -0500

macroz15:11:41

seems to be the latest in GitHub as well

dpsutton15:11:56

weird. the tests pass for me

dpsutton15:11:23

and you ran them with make test?

macroz15:11:35

ran cask first but then make test

macroz15:11:03

Test clojure-find-ns-test condition: (ert-test-failed ((should (equal "foo-bar" (clojure-find-ns))) :form (equal "foo-bar" "^{:doc") :value nil :explanation (arrays-of-different-length 7 6 "foo-bar" "^{:doc" first-mismatch-at 0)))

dpsutton15:11:15

strange. i just cloned another copy. cask install then make test

macroz15:11:26

let me try again

macroz15:11:11

still fails

dpsutton15:11:24

lodge a ticket. what os emacs version etc?

macroz15:11:41

what other packages does this depend on and how does it get them?

macroz15:11:48

does this testing run emacs with some settings?

macroz15:11:00

I mean can there be something that is dependent on my emacs setup

dpsutton15:11:04

it runs it super bare with the deps it downloads into .cask

macroz15:11:12

GNU Emacs 24.5.1

dpsutton15:11:22

oh. i'm not sure emacs 24 is still supported

dpsutton15:11:31

that's an old version. i'm running in 27

macroz15:11:37

if it ain't broke ...

macroz15:11:55

last I checked there was a lot of broken stuff in the newer ones but I can try upgrading and seeing if it helps

dpsutton15:11:55

;; Package-Requires: ((emacs "25.1"))

macroz15:11:13

emacs => emacs24, but emacs25 would be available

macroz15:11:28

I just don't use it for anything myself

macroz15:11:17

maybe this is a good reason to see if upgrading makes sense

macroz15:11:29

I'll get back to this later, perhaps next week

macroz15:11:39

I'll report back + do the PRs

macroz12:11:59

I got everything to work with Emacs 26 series and did a couple initial PRs ☑️