>Programming resources for Emacs Lisp, Common Lisp, Scheme and Clojure: pastebin.com/nyTQp7qi
>Troubleshooting If there seems to be a bug (or complicated issue), anons may ask you to compose an MWE (minimum working example). To create an MWE, try the following: 1) start emacs with "emacs -q". This disables your init. 2) try to reproduce your issue with as few settings changed and packages (manually) loaded as possible. These steps ensure that other anons can replicate your problem if it's something more involved. Sometimes you even find the cause yourself this way, too!
It still seems rather wasteful. Gimped vim runnig over an emacs you never learned how to use, whats the point?
Joseph Young
is it really worth getting into Emacs if I don't code beyond the occasional shell script of a dozen lines or so? Most of what I type is just general English text and such.
Easton Baker
I like it but it's really just taste at that point. No need to swap if you're comfy in vim, unless you'd like to try it out or smth
Joseph Kelly
>It still seems rather wasteful. How so? >an emacs you never learned how to use I can work my way around vanilla emacs, but I obviously prefer vim-style keybindings for navigation and editing.
Evil is hands down the vim emulation on any editor i have used.
Charles Turner
*the best
Jayden Brooks
*THE vim emulation
Jonathan Ross
i gave up on cooding a while ago but i still use emacs a shit ton. it's god tier for markup/prose/plaintext
Liam Kelly
Dunno about prose (I heard there are unironically actual writers using emacs instead of specialized software, see github.com/thinkhuman/writingwithemacs) but org-mode is the reason why many people use emacs at all. It's pretty retarded tbqh. They go for too much wikification imo. t. uses emacs for both coding and note taking
Brayden Mitchell
It's not gimped. It's decent from my perspective as a long time vim user.
Ian Garcia
Why can't I map over cons-cells in Racket? Is this normal behavior? It's complicating my program so much that I wonder if I should even use cons cells.
>I heard there are unironically actual writers using emacs instead of specialized software does specialized software for authors even exist? >org-mode is the reason why many people use emacs at all. It's pretty retarded tbqh. They go for too much wikification imo. not really, the whole point of org is that it's as complex as you need it to be
It works better than vim in most cases. I would say it is on par, if not better than vim's handling of these keybinds.
>emacs you never learned how to use Learning the default keys is irrelevant. Knowing how to use emacs is knowing how to remap them to something you like.
Ian Bennett
could not realy be much simpler
(defun mapcons (fun cell) (cons (funcall fun (car cell)) (funcall fun (cdr cell)))) mapcons
>(cdr '(a . b)) -> b (not a list) >(car (cdr '(a . b))) -> error, b is not a list >mapCAR That's why lol.
Owen Cook
Welcome to Racket v8.3 [cs]. > mapcar mapcar: undefined; cannot reference an identifier before its definition in module: top-level context...: body of top-level /gnu/store/nivzasmjdp2pgh93hj7wvwrlmwkasljh-racket-minimal-8.3/share/racket/collects/racket/repl.rkt:11:26
William Miller
the function names differ in different lisps mapcar is used in emacs lisp
but the same idea applies
Dylan Peterson
Also if you're interested in iterating over an alist (dolist (muh-cons-cell muh-alist) (fn-on-key (car muh-cons-cell)) (fn-on-value (cdr muh-cons-cell)))
ez
Aiden Powell
also being a pedophile will spiritually inhibit you from becoming a master wizard
Jason Nelson
Stallmanbros...
Joseph Martin
>It's complicating my program so much that I wonder if I should even use cons cells. If it helps, you should use records to hold structures.
Guile is pretty good, but I don't like how it won't be available on Windows.
Tyler Peterson
Meh. Bill Gates can kiss my ass. Libre is the way.
Charles Jones
you should add something like (setq custom-file "~/.emacs.d/custom.el") so the custom stuff doesn't clutter your config
Evan Russell
Thanks, which part(s) should be split off into the file? All of it? It's not a big deal at the moment since there's not much there, but at some point it could become cluttered like you say.
The parts added by Custom: custom-set-variables and custom-set-faces. You should also load it after you change where custom lives. (setq custom-file "~/.emacs.d/custom.el") (load custom-file)
Cameron Scott
Chez is pretty good, it has a native installer for Windows. It's also very fast. Another option is Kawa but you need JVM. If you can install Cygwin or the like, there are more options available.
Henry Morales
>Chez What do you do for libraries? Chez's built-in libraries are primitive.
Carson Brooks
As others have said, Evil is unironically a better Vim than Vim itself. Not convinced? Try the following in both: i1 2 3 4 5 6 7F2vf6l:!tr ' ' '\n' | sort -r | tr '\n' ' '
Elijah Nguyen
But I don't want Vim. I want Emacs with Vi-style keybindings, and Evil delivers. There is much more to Emacs than the keybindings.
Daniel Thomas
is there any advantage to learning vim keybindings as a long-time emacs user?
Nolan Gomez
i quite like the mnemonic-style emacs chorded keybinds as it is so i'm on the fence about it
Nathaniel Thomas
>Learning the default keys is irrelevant. I disagree. Some modes or extensions often use keybindings based on the default Emacs ones, usually for navigation, therefore it makes sense to at least become familiar with them. They aren't hard at all, really, since they are not modal. However, it's true that, as you get more comfortable with Emacs and recognize common patterns in your workflow, you should automate as much as possible with Elisp and take advantage of custom bindings.
Isaac Lopez
I am really surprised that key-chord is not built-in. The possibilities it opens are huge.
Alexander Edwards
Why is everyone saying "HURR DURR YOU CAN PROTOTYPE SUPER FAST IN COMMON LISP"? Is this a feature of using the REPL? I feel like i am holding it wrong, because i keep debugging functions the way i would debug them in python
Sure you can isolate the functions and call them explicitly, but that's about all the extra things I've found What am i doing wrong
James Green
It's a different style of development. Starting with the data you want to transform, apply transformation, evaluate, and repeat. It's not limited only to lisp but it really is an attractive feature of the language.
Juan Hill
You kind of end up with a workflow where when writing a function, the input is like a seed, and you grow the code around it, evaluating often.
John Collins
is this not basically TDD at the same time?
Sebastian Hill
Kind of, but having a testing framework in place, especially for more complex projects, should not be neglected. But I have found developing in this style to be incredibly intuitive and efficient.
Gavin Stewart
You use the REPL + Inspector and continually modify the function until you get the behavior you want. It's 100x more productive than Python once you get used to it, especially for long-running programs, like building a web API or game as it's running.
Isaac Sanchez
thanks anons
Carter White
Once it clicks I guarantee you will be having the most fun programming than you have had in quite a while.
Henry Peterson
can you elaborate on using the inspector? i know SLIME/SLY can do that, but i've never gotten further than inspecting the call stack (and even that was only after interrupting an infinite loop)
Charles Ramirez
let's just say c-x c-e changes the game entirely evaluation on-the-fly is based
Logan Wood
Absolutely. I've been programming for 15 years and after familiarizing myself with this style of development, I dread having to use C ever again.
Carter Murphy
(defpackage a (:use :cl) (:export :vowel))
(in-package :a)
(defun vowel (sym) (member sym '(a u i e o)))
>function does not actually work when the file is loaded in the repl
(load "a.lisp")
(a:vowel 'a) NIL
(a:vowel 'b) NIL
The symbols '(a u i e o) in the package are different, aren't they? Gotta export them too somehow? Well fuck this shit.
I give up on this lisp package and namespace stuff. Everything's going in a single fuckhuge main.lisp even if it gets to 50k+ loc. At least that way its somehow manageable and I'm not getting GOTCHA like the namespace recursion problem I'm looking at right now.
Jaxson Wright
Something something no RSI
John Thomas
You could use keywords or one package in multiple files. A common convention is having one packages.lisp file for all the package definitions in the project.
Owen Price
HJKL is superior to BNPF in every regard except when you're using non-qwerty keyboard. Otherwise it's not really worth it.
Connor Reyes
Racket. You can build something useful with it.
Jaxson Fisher
Good shout. Maybe I'll switch when I start developing more serious injuries. I've got a broken knuckle but my RSI seems to have improved. No doubt I'll develop more problems moving forwards though.
Thomas Garcia
You don't. Scheme is a fairly minimal language (at least for now), all it provides you are essential procedures and features that cover every things you can imagine. What you can do via libraries, you can do the same using everything in a Scheme standard. What I said was a cope, btw. Scheme ecosystem *is* shit. It's called the most unportable language for reasons. Guess what, nobody want to write a library for multiple implementations, each with its own quirks and flaws. If you want libraries you better use Racket (btw, it doesn't even call itself a scheme implementation anymore) or, say, Chicken, or each implementation's FFI. Scheme, a language, not an implantation, is shit to do anything practical with.
Connor Ramirez
>They aren't hard at all, really, since they are not modal. That makes them harder. First thing I do when I get a package is remap all the keys not covered by evil collection (which is most packages nowadays anyway).
Brody Stewart
No. XFK is the most efficientâ„¢ keybinding for Emacs. Vim isn't that good, it's just popular. The point is, your code isn't a dead tree on the source files. It's alive in REPL, you can toy around with it easier and faster than code-compile-debug-repeat style. Giving a good and powerful REPL experience is one of the strongest point of (Common) Lisp.
Carson Carter
Hey, is it normal that on every buffer emacs will create empty space until the last element is outside of the screen? See pic for an example of what I mean. What you see is the dashboard and on the top of the buffer it's the random phrase that you see at the bottom of the dashboard. Look at the scrollbar, I was able to scroll all the way down even though it's useless space, just because this last element of the dashboard is still not out of the screen. Is this normal? Desirable? Can I change this and set it so that it will only create space for what I'm using?
How did you scroll down? scroll-up-command can behave like your post but moving around normally shouldn't involve that command. You can C-h l to see a list of recent commands you used.
Jeremiah Jones
What do you mean? I just went to my dashboard and scrolled down with the scroll wheel. It shows a whole bunch of stuff like in my commands with next to it "mwheel-scroll"
Leo Morgan
scroll-up-command is one of the commands you can use to move around. It can scroll over the "edge" like you're seeing. I also have this behavior for the mouse wheel. You can bind other function to the mouse wheel if you don't want this.
Camden Russell
Lmao should have used Clojure if you want generic programming
Joshua Sanders
>Is this normal? Yes. It's just filler space so you can scroll beyond the last line. >Desirable? Maybe. Vim and Acme have the same behavior.
Robert Bennett
I'm not interested in Java. It was just a demonstration, user was asking why it isn't possible to map over cons cells, which seems useless regardless.
Gavin Walker
But I have the impression it's not even going beyond the edge per se, but just moving the edge further away by default. When I go on any page, by looking at the scrollbar I see that it has a lot of empty space I can go to, look at the screen for example. And when I try to scroll up it's not doing anything, it's always at the bottom that there is added empty space until the last element is at the top or out of sight. Ok so you confirm it's normal then. hmm, ok. If everyone has this then maybe I shouldn't touch that. and leave it alone.
>How is it fucked up? It shouldn't count the empty space below the last line, no? People can get confused by that. >Some people like the scroll-bar. But you won't have a problem with the scroll bar if you don't have the scroll bar.
No, the scrollbar isn't the problem but it's an indicator to the fact that empty useless space is already present down there. On another note, I tried to get rid of my scrollbar but all the replacement packages that could work as useful indicators for the modeline to show me my position in a document were fucked and went outside of their boundaries, sometimes for...reasons that still go beyond me, and other times I feel like it was because of that useless space I'm talking about. That's why I thought there could be something wrong with the way emacs loads buffers. Still not sure it's normal even though user above said it was.
Colton Wright
Thanks for the suggestions Anons. I was hesitant with Racket because I read its interactive experience was really poor, but I'll jump into it anyways.
I've started to realize that I barely use emacs features to justify how I'm using it. The only things I regularly use is 'dired' and the base editor. I'm thinking about just switching to 'mg', 'tmux' but I'm not sure what will replace 'dired'.
Aiden Cooper
I don't know. More interested in learning theory and stuff and I started SICP but I would be interested in CL since it seems it's actually used in the "real world".
Alexander Kelly
Yeah, Scheme is good for learning, but CL is good for doing real stuff. Since you are reading SICP, you shouldn't mind CL for now. Switching from Scheme to CL is kinda easy if you want to try it out later. SICP isn't a Scheme book BTW.
Bentley Powell
Yes Yes Yes
Guys I need help, I have org files saved and tagged with #+filetags: tag1:tag2
If i want to convert every file tagged with "tag1" for example with org-latex-export-to-pdf How can I do it?
I tried grepping tags via shell and send the filenames to emacs --batch but my files do have special links that works only if my .emacs is loaded. When using M-x org-latex-export-to-pdf it works in my session
Aaron Scott
Clojure is used more than either in real world work. But Common Lisp is closer to the "proper lisp" Platonic ideal than either.
Isaiah Hernandez
Use the -l option?
Bentley Diaz
What's a good scheme book? Isn't Racket based on scheme and SICP use a diaper of scheme? Thanks for the rec though.
Ryan Powell
Goddman phone poster I am *dialect
Ian Davis
yes but I wanted to do it with elisp
Lincoln Bennett
Ok new problem arise, if I do org-latex-ec..-pdf from within emacs I get a pdf with all the contents while from the command line i get a void pdf with just the word "contents"
Matthew Price
SICP uses plain Scheme with a handful of built-ins that are in MIT-Scheme. Racket is a dialect that diverged from Scheme a while ago. >What's a good scheme book? The OP lists scheme.com/tspl4/ as one of the recommended Scheme books. I recommend "The Little Schemer" instead if you're new to Lisp.
Charles Collins
The best one is the Scheme standard + your implementation manual. This is the most "practical" Scheme you can get. However, there are a few good Scheme books to learn the language (and CS ideas in general) like the little Schemer (and the books in the series), sketchy Lisp, the Scheme programming (3rd edition for R5RS, 4th edition for R6RS). Algorithms for Functional Programming looks good, too, but I haven't read it yet. As well as Software Design for Flexibility and htdp.org/ that look like SICP-lite as far as I heard. Racket was Scheme, but it's basically its own language now.
Michael Gray
What about Let Over Lambda and On Lisp? Jewgle recommended these books to me as I was fishing for some info on macros.
Jaxson Richardson
they're both great. read "On Lisp" first, and you might need to spend some time with it before reading "Let Over Lambda", which is also great, but also completely insane.
Landon Bailey
They are good, but you should really have a good understanding of the basic before you get serious with CL macro.
Adam Davis
ranger/nnn/midnight commander?
Mason Reed
Thanks for the recs user!
Brandon Martin
Emacs is much comfier to program
Hudson Hughes
Best resources for learning to implement Scheme reader?
>I was hesitant with Racket because I read its interactive experience was really poor, but I'll jump into it anyways. This looks like a good enough interactive experience to me: youtube.com/watch?v=AXJ9tTVGDwU Racket has a great documentation culture too. Everyone is encouraged to write their docs in scribl, and there's a lot of infrastructure in place to make it look clean and readable and widely accessible. docs.racket-lang.org/gui-easy/index.html
Owen Cox
What's the point in switching away? There is an effort cost to changing your habits, and then you loose the upgrade path that emacs offers if you did want one of those features. I guess if you really can't afford the 100MB that emacs takes up then it is worth it, but that really isn't much storage at all.
Kevin Long
lispchuds... d-did we get too cocky?
Jeremiah Stewart
most evil users eventually learn the emacs defaults, but just choose to stick with evil because it's comfier
Michael Nguyen
Emacs keybindings are perfect and are necessary for the flow. It doesn't need more than a little tweaking at most. Get out of here and make your own general, this is for the emacs chads you fucking tourists.
Jeremiah Robinson
Don't download Chinese package. Simple as.
Leo Bell
based
Thomas Green
>Emacs keybindings are perfect They're pretty bad and hard on your hands and wrists. Only org-mode has decent and intuitive default keybindings. Vi keybindings make emacs tolerable.
Benjamin Jenkins
>is there any advantage to learning vim keybindings as a long-time emacs user? None. Use Emacs with vanilla keybindings, as RMS/God intended.
William Fisher
>They're pretty bad and hard on your hands and wrists. Map ctrl to caps lock. Zero RSI after that.
Benjamin Butler
mg is based
Angel Cox
what makes org different? most mode specific keybindings are mnemonic
Andrew Watson
No nigger.
caps esc alt ctrl
Use thumbs for ctrl like God meant us to.
Jason Rogers
if you're running a nice split keyboard with thumb modifiers, yeah, emacs default keybinds work. but sometimes you're on a laptop keyboard and it's clear that evil-mode and god-mode just provide a better user experience for accessing that functionality.
Ryder White
kys troon
Aaron Clark
M-enter is an ergonomic way to start a header. M-$arrowkey keeps your hands close to where M-enter is and is an intuitive way to do structural operations. TAB cycling on headers is intuitive.
The main operations don't require difficult chords, and they're intuitive. I think this part of org-mode is well designed. It feels fast.
Daniel Allen
No Yes, thats what I do If you're typing with a laptop keyboard, evil or not, old thinkpad or not, you're doomed to have problems. I still have a normal keyboard but yeah I'm planning to go for a personalized split keyboard.
Ryder Johnson
>Map ctrl to caps lock. Zero RSI after that. I don't think mapping one of the most used keys to your pinky is a great way to avoid RSI.
Adrian Garcia
your fingers rest naturally on home row. caps lock is on the home row.
extending your pinky slightly to the left of the A key is way better than stretching it out and down below the shift.
Samuel Ward
>I still have a normal keyboard but yeah I'm planning to go for a personalized split keyboard I recommend the lily58, it's really nice for emacs. I still use evil-mode because modifiers still aren't as comfy as full-on modal editing and keep god-mode around for when I'm on an airplane and typing on my laptop's keyboard, though.
Looks good. There's so many keyboards on the market, so I feel a little lost. I guess you say it's good for emacs because of the placement of the alt, ctrl, super keys, they definitely look practical (although I'd have put them closer to the middle, considering I want to have as easy an acces to them with my thumbs as possible)
Noah Watson
it's fully programmable, you solder it together and program/build/upload the firmware for it yourself with qmk firmware, so really the thumb keys are whatever you want them to be.
pic related isn't mine, I use a layout that's much closer to symmetrical
Gabriel Morales
stop using QWERTY
Matthew Martin
nah, I mainly built the split just for postural reasons and I already can work with both vi and emacs keybindings comfortably, that's as deep as I'm going to go and no heatmap is going to convince me otherwise
Josiah Perry
fair enough user, and yes, the split is comfy
Jacob Roberts
erichgrunewald.com/posts/how-bad-is-qwerty-really-a-review-of-the-literature-such-as-it-is/ >Assuming a person [types] 1,000 words a day, typing will solely take about 15 minutes a day. If that person can save 10% of typing time by changing to Dvorak, he or she can save 1.5 minutes a day, 45 minutes a month, and finally 9 hours a year. It means this time saving might be overwhelmed by the cost of changing the layout.[33]
>How much time do we actually spend typing? Xah Lee logged his keyboard use for two years and found that he typed roughly one hour per day (assuming 50 words per minute). Now, that is likely an underestimate as it only records the stuff he wrote in Emacs, but he also reports spending 13 hours a day in front of the computer, much of it likely in Emacs. Most people probably type significantly less. A 5% improvement for Xah Lee would save him around 18 hours per year, which is not bad, but also the upper end of what one might expect. It's likely that the amount of time you'd save typing wouldn't exceed the amount of time you spent learning Dvorak
Connor Collins
I learned Colemak for the comfort and ergonomics, not necessarily the speed
Eli Lewis
1,000 words a day is really low, and the discussion is not about speed, it's about ergonomics and reducing strain
Dylan James
Does anyone here use trivial match for common lisp? How would you bind a part of a pattern to a variable? (match x ((list (type symbol) ))
How would I return the symbol?
Benjamin Morales
How’s parenscript? Can I make single page applications with it or is it too immature?
Jose Howard
Tell me about the pondering mage Why does he keep getting posted
Leo Reed
The pinky, the most shitty finger in existence, is already responsible for pressing more buttons than most other fingers since it is on the outside of the hand. Assigning even more work to it is a questionable idea. Of course, these things are very individual. The good thing is that you can try things out, and you have plenty of time to adjust if you feel pain appearing in some part of your hand. Kinesis Advantage 2 is a very good keyboard.
Jackson Bailey
Oh and to be clear, if there is an assumption here that you press the ctrl key with your pinky (which you seem to do, when I read your post again), then sure. But it's not a solution to the fundamental problem of the pinky being a piece of trash.
William Kelly
it's a nice image
Jayden Sullivan
how to make experience with sdl2 in common lisp more pleasant? I mean, every time I fuck up something I need to restart repl. For example: I forgot to handle "x" click to close window, now if I just call (sb-thread:destroy-thread ...) the window will close just fine but I'll not be able to open another one until I call (sly-restart-inferior-lisp) and reinitialize everything again.
Nolan Long
Take a look at how sketch does it You can close the window there without killing the sdl2 loop Can't give more details because i have no clue about internals there
Lincoln White
Is LISP any good for handling strings? Today I was trying to come up with an algorithm for finding the best first guess on the game "wordle", and the Python program for that turned out pretty ugly and slow.
Jacob Powell
>the Python program for that turned out pretty ugly and slow let's see it
Nathaniel Moore
About as good as any other language, except the standard string library needs to be imported.
Nicholas Bell
Is the kinesis advantage 2 really adapted for emacs? Seems to me like alt and ctrl placements are a little bit too far away to push it with the thumb quickly. Appart from that it seems great ergonomically.
Kayden King
vimtard here, how tf do i visit a new vile with doom emacs? managed to open a scratch buffer somehow, but inadvertently closed it
by default in insert mode press ctrl+e for an editor, it'll spawn a emacs window. pic related for those with a ZSA moonlader: set this to the thumb cluster middle key and it's so comfy for emacs
M-x find-file I don't know what key does doom bind the function to.
Jayden Gray
I don't use DOOM, but :e should work like vim
Nolan Edwards
M-x file shows me what's available at least, but find-file seems predicated on there already being one written to disk. lol thx that works. Probably why I decoded on doom in the first place
Brayden Kelly
>find-file seems predicated on there already being one written to disk. You can type the filename that you want to create and you'll get one. The file won't really exist unitl you save the buffer.
Anthony Turner
Hmm, when I press RET, it prefaces the filename I entered with (match-required)
James Barnes
Weird. All the minibuffer completion that doorm has should work ootb.
Cooper Harris
Well it says "Edit file FILENAME", and there's one called find-file-existing, which says "Edit the existing file FILENAME", so I don't see why it doesn't work for me. Ah well
Nathaniel Brooks
It's mature enough for the Nyxt browser.
Joshua James
>the best first guess on the game "worldle" You're using an established string similiarity algorythm with a sort, right? Right?
Luke Allen
>shortdoc based
Wyatt Roberts
Why don't I see AOMP or Let Over Lambda shilled here? They're some of the best Lisp books out there.
You can. Actually, a good compiler, Lisp or other langauge, will do that as much as it can.
Landon Clark
Which style of macros is easiest to add to a simple Lisp?
Matthew Williams
Common Lisp/Emacs Lisp style macros.
William Sullivan
I can't decide between Common Lisp, Racket and Clojure can someone give me any advice? I like CL because it's the most "lisp" lisp that I've seen so far and also because it has a standard which basically guarantees that my programs will still work in a few years. I also like CL because it allows for more "bare-metal" programming compared to something like Clojure which relies on the JVM. I like Racket because it has a better standard library compared to CL. I dislike Racket because it has a gimped REPL compared to CL. I like Clojure for the same reason I like Racket. I dislike Clojure because it most of the times relies on the JVM. I also dislike Clojure because its REPL while better than Racket's is still worse than the one you get with CL. I'd just wish that CL could have a good GUI library like Racket does and that it would be as portable and widely used as Clojure without having to subscribe to the JVM (I just want to make software for Desktops and for Phones).
Xavier Fisher
SPC-.
Sebastian Gutierrez
Nothing wrong with JVM. It's well-tested and generally good runtime. You don't have to choose one and discard the others, use the appropriate tool for the problem you are trying to solve.
Blake Mitchell
>(I just want to make software for Desktops and for Phones). You're only choice is Clojure and his pal ClojureScript.
Henry Lewis
They look like advanced Lisp books that require some pre-reading. There's enough good Lisp books out there to make a reading chart out of them.
Dylan Carter
uhh.. tried "SPC .", and it gave me a dialogue where i could find file. entered a new filename but it didn't work. then i tried "SPC - ." and it said dired down in the right corner, and appears to have opened a buffer with the contents of "ls -l", and now it's stuck burning 100% cpu >WTF
Eli Rivera
To create a new file: SPC b N to open an empty buffer, SPC f S to save it
Nathan Lewis
It works great, ctrl and alt are in very comfortable positions. It takes a few days to get used to.
Joshua Russell
Is there like a reference to the library functions available in elisp? For starters it took me an undue amount of searching to figure out that print was called prin1
Parker Barnes
Thanks for exactly answering my question!
Angel Fisher
user maybe already gave you a satisfactory answer, but a theory about what might have happened: When you press SPC-., you will search through all files in the current directory. If there is a match when you press enter, that file will be opened. In your case, that file might have been a directory, and you subsequently opened the directory. What you want to do is enter SPC-., type the file name you want, then press C-k. This goes up one step in a list, and will select the text you entered (and therefore create a new file), rather than one of the existing suggestions.
Wyatt Brown
Wow, that worked, and it even provided scaffolding comments and stuff
Jayden Martinez
Couldn't you technically use CFFI and target the android NDK in CL?
Ryder Gutierrez
What the actual fuck!? I somehow overwrote the file I was editing with this nonsense: nvm can't even copy it
something about debugger entered--Lisp error_ (void-variable w) so i tried to write and it overwrote the file with the contents of an error message about it not understanding what i meant by write.. oh joy
Liam Barnes
This is a fundamental feature of emacs to make sure you're committing at least once every 30 seconsd.
Thomas Wilson
Ok, does that mean there's a way to restore the contents I overwrote?
Parker Davis
Now I'm worried that you think I was serious.
Dominic Foster
Oh.. Look I didn't even know how to open a new fucking file with emacs a earlier itt
Parker Martinez
I don't understand what you are talking about. So you are editing a file, type "nvm can't even copy it" and get an error? Can you post a gif or a detailed step-by-step of what you are doing?
Liam Kelly
No worries, I'm just fucking with you. I have no idea what could have caused you to overwrite your entire buffer like that. Usually if you encounter an error, it would just exit the current function and no harm done.
Joseph Sanchez
Read what he said. The error message opened in a new buffer and while he was in that buffer he saved it to his file
Oliver Wright
Thanks for trying to understand my issue. I was editing file "a.el", wrote some elisp, tested it and so on, then decided to write it. Apparently I must have done something wrong, because I got an error message about w being a void variable, when I did "ESC :w RET". Furthermore, I somehow wrote that error message to to "a.el", and now while trying to copy it into my browser, I figured out I can't even copy. Did right click like 3 times after selecting everything, and now all the text is gone, but the clipboard is filled with something I copied earlier, even though I evaluated "(setq x-select-enable-clipboard t)". I don't even..
Eli Lee
Ok, so there's a bit of a learning curve to this. No way of restoring what I saved to that file before, I presume?
Nathaniel Davis
Did you close the buffer where the file was opened in the first place? You really should be running git anyways, or have other forms of backups.
Nolan Ramirez
I somehow crashed emacs. Is there a swap file like with vim?It's not that big of a deal really, just some basic hello and 1+1 stuff, but I'm amazed as to how alien this editor is to me
Mason Wood
>w being a void variable >ESC :w RET Does the code you tested have `w' as a variable? If it doesn't then I think it's Evil's issue. > I somehow wrote that error message to to "a.el", That's a problem since we can't know what exactly did you do. But Emacs can undo things just fine. Better yet, there is a package called `undo-tree` that can visualize a change in a buffer in a tree graph. >I can't even copy I don't know what does Evil used to copy, but you can always call M-x copy-region-as-kill to copy it. >Did right click like 3 times after selecting everything, and now all the text is gone I think that's the default behavior. My Emacs also acts like that, double right click, to be precise. Since you are new, I recommend Xah's tutorial. It helped me a lot when I started using Emacs xahlee.info/emacs/emacs/emacs.html There is an automatically backup feature but I don't know whether doom enables it by default or not. gnu.org/software/emacs/manual/html_node/emacs/Backup.html
Cameron White
I just installed Emacs and tried Witchmacs. I like vi keybindings for editing text, but evil mode seems to ruin stuff like dired or info. Is there a way to disable evil mode when entering dired or info?
Andrew Lewis
>Does the code you tested have `w' as a variable? No. >Evil issue Maybe, but it's more likely I pressed something wrong. >That's a problem since we can't know what exactly did you do. This user summed it up. >My Emacs also acts like that, double right click, to be precise. Ok. I don't think it's worth the hassle to try and restore a few lines of babbys first elisp. I'm skimming through gnu.org/software/emacs/manual/pdf/eintr.pdf but I'll check out that tutorial as well
Adam Wright
You can add a function to the mode's hook to disable Evil. (add-hook 'dired-mode-hook '#(lambda () (evil-mode -1))) (add-hook 'Info-mode-hook '#(lambda () (evil-mode -1))) The (evil-mode -1) is a place holder but that's more or less a stardard way to disable a mode (I don't use Evil.) That book is a book to learn Elisp, not really a book to learn how to use Emacs. It's a good book regardless, you can read it in Emacs. C-h i and search for Emacs Lisp Intro. You'll get an interactive experience this way. For example, you can move a cursor to the end of an s-experssion, press C-x e, and you'll get see the result in real-time. It's great fun to learn Elisp from within Emacs.
Austin Jenkins
1. (evil-set-initial-state 'MODE 'emacs) 2. Have you tried using evil-collection to get evil bindings in other modes?
Leo Hernandez
oh ffs.. Please, can you tell me how to switch between a buffer, frame whatever it's called, where I have the file I'm testing stuff in, and a another one underneath, where I have the manual? C-x b lets me select a different buffer in the current window, but while C- (or right) let me switch from the info buffer, I can't figure out how to get back to i
Christian Wilson
Meant C-x or C-x , but that doesn't work for the *info* buffer. C-x o also lets me switch from it, but not to it
Lincoln Hall
Think of info buffer as its own webpage. You can switch between buffer, but you can't use the same command to switch between info page because, well, it's the same buffer. I don't use info that much but I think u and/or b will bring you back to the previous info page (it's call a node). You can also use mouse to navigate info, just click on the navigation buttons on the top of an info page.
Carter White
Oh, I can just click it. Wait, so the info page is not its own buffer? Is there a keybinding to switch focus from the info page to the buffer I'm editing? If I have to use the mouse, I may as well use the browser.
Zachary Davis
>the info page is not its own buffer It is a buffer. Did I make you confuse? >Is there a keybinding to switch focus from the info page to the buffer I'm editing You can do that like you do to buffers.
Gavin Morales
Hello guys, just wondering if any of you actually use xah-fly-keys for emacs. Do you think they're worth the switch from evil?
Aaron Baker
I do. Try it out and judge for yourself. I like XFK because vim movement is fucked on Dvorak keyboard. The keybind is fine, you got somewhat essential and often-used functions nicely grouped together. The small helper functions he wrote are handy too.
Hunter Hall
>You can do that like you do to buffers. But I can't. Opening another buffer with C-x 2 lets me do C-x o to switch between it and the first buffer, but I can't switch to the info page. Switching to the second buffer, then doing C-x b and selecting *info*, then ESC to close the info page works, but it makes me think the info that pops up when doing C-h RET is not a buffer in its own right.
Evan Hill
Thanks >2. Have you tried using evil-collection to get evil bindings in other modes? I don’t feel like its worth it and I’m already used to info keybindings from using the info program. I just like vi keybindings for writing text.
Chase Evans
Hmm, the bottom line moves up above it, so I'm thinking it's the minibuffer, and that doesn't get treated like an ordinary buffer. Does that make sense?
Jaxson Davis
I see what you are doing now. C-x 2 will split your Emacs's windows. So you can switching between the two using C-x o. That's all it does. You have 2 "area" for buffers. You can switch between these 2 areas but to switch to the other, background buffers, you have to C-x b to choose which one do you want to use. Does this make it clear?
Landon Williams
Yes, but can I resize the areas like in tmux?
Leo James
Of course. emacswiki.org/emacs/WindowResize The default keybindings are hard to use but you can rebind them or use a mouse if you like.
Michael Adams
Oh, found my way there just before you posted that link. Default keybindings area indeed a bit clumsy. Thanks, ought to be able to figure out a bit more now.
Jace Martin
Emacs can't find my ghcup stuff. On installation, it added this to .bashrc: [ -f "/home/user/.ghcup/env" ] && source "/home/user/.ghcup/env" # ghcup-env
How do I get emacs to understand it as well?
Julian Baker
In general, you should really be setting your environment variables in your ~/.profile, so that all your programs have access to them. You could workaround this for now by opening emacs in the shell with emacs & + disowning it.
Gabriel Kelly
Thanks! Why can't I just add it to .profile? I tried now and didn't work.
Mason Jenkins
Replace "source" with "." If that doesn't work it's something to do with ghcup.
Owen Barnes
lisp is the most powerful programming langu-
Kayden Ramirez
Oh, or you haven't logged out and logged back in. Your ~/.profile is read once when you first login.
Aaron Perez
And you can drag the figures to use them as arguments to functions. Mathematica is wild.
Jack Diaz
ah, I see. Thank you!
Cameron Gomez
>my lang has so and so builtin >yours is dead Do you even have subseq?
Sorry if this is a dumb question, I'm currently trying to install yukimacs at the moment, but after setting everything up, it ends up looking like this, does anybody know what exactly I messed up?
maybe yuki is modifying your config while you aren't looking
Jace Barnes
Sorry for the tech support, by the way, I'm just pretty new to this and don't know how exactly to go about tackling this. Looks like it. What font does yukimacs use? Well, how could I check/fix that?
No, like this: clhs.lisp.se/Body/f_subseq.htm It returns the values of a sequence between two bounds, and allows those values to be set to a new sequence in the original via SETF.
Carson Hill
What's your preferred font? I just use dejavu sans mono
Gabriel Barnes
>What font does yukimacs use? user, it's literally on the first thing you see on readme. Iosevka.
Hudson Lewis
Sorry bro we don't support yukimacs here. Witchmacs is the canonical configuration.
Make sure to check out chez-srfi though, as well as all the Scheme packages that work on every platform (match, irregex, SXML, etc.) Match is essential for every Scheme program in my opinion. chez-srfi implements 66 SRFIs for Chez Scheme, which adds up to a whopping 67 thousand lines of code. Chez itself is also about 20-30% faster than SBCL for all but floating-point calculation purposes
Blake Jackson
cliki.net/GUI Most of these are abandoned, but the ECL Qt binding seems pretty fresh. Wrapping GTK shouldn't be that hard, either. ABCL is another option for desktop systems and lets you use SWING/JavaFX or whatever. On phones it's more tricky. There you will probably have to use their native tooling for the GUI and call into/back from the Lisp core logic. On Android ABCL might work, otherwise ECL is probably the best bet. In that case you might even get away with using QML. Dunno about iOS. Anyway, Portable GUI is a hard problem no matter the language, especially if you also add phones into the mix. Still, CL is available anywhere and depending on what exactly you're looking for or where you're willing to compromise there's no reason it wouldn't work for GUI desktop software.
Ryder Stewart
OK so basically I want to indent a bunch of lines by two spaces, how do I do this? This is something custom, outside of auto-indent.
Adrian Cruz
Nevermind I found it it was c-x tab
Josiah Hughes
there's this restart in common lisp: >[ABORT] abort thread (#THREAD "repl-thread"... is it possible to add handler or something to change it's behavior?
Nathaniel Taylor
I think it's easier with ECL, but either option means getting dirty with C.
Dylan Price
People managed to target the PS2 using a custom lisp written in CL github.com/water111/jak-project So I believe that you can definitely target any platform you want to using CL (even if that means writing your own Lisp, which isn't that hard).
Kevin Adams
in evil mode, do you guys bind esc to something else?
Gavin Robinson
i bind esc to caps lock. much comfier
Luis Clark
common lisp is an uphill battle, any time you need anything third-party you'll have trouble. it's just not a mainstream language and, even though it technically "can do anything", most of the time it just isn't very practical
clojure is the opposite, it's the only lisp that's a relatively mainstream and modern language, so you'll have a lot more support from the community, but I personally dislike the language itself. it seems to be obsessed with functional programming the same way haskell is, and that's not very lispy. I never got very deep into it so I might be wrong, but from the outside it seems too restrictive compared to the other big two
again, personal opinion, but I think the only context where you can freely use lisp nowadays is for your own personal stuff. there's no incentive to use anything but clojure for a project you want to deploy somewhere else, and clojure doesn't feel good as the others.
Leo Cooper
Sorry for the dumb question but how do you rebind evil mode kebinds? I want to change insert mode to caps lock
>chez-srfi Thanks, never heard of this. >match, irregex, SXML, etc. What are these? chez-srfi don't seem to have them.
Logan White
You can't bind caps lock through emacs. Does swapping caps lock with escape work for you? setxkbmap -option caps:swapescape
Michael King
I really don't understand how emacs can increase productivity/better workflow. I look at it and I'm not trying to hate I would like to use it but I just really dont 'get' it
Elijah Turner
I came to emacs to basically just use it as a better vim. I've found the plugins are much easier to set up and work better, and unlike other editors, the vim bindings here (evil mode) actually work and I don't feel like a second class citizen while using them. I only wish it wasn't so slow. The difference between it and vim is definitely noticeable. Compiling the latest version myself makes it way better, but the other day I tried updating it and kept getting weird errors when opening it, so I ended up going back to emacs 27 and it's slow again and im sad :( Oh well though, I'll just try again next update.
Dylan Hernandez
Integrability and extensibility. You can do all your work in Emacs, they together form a single, unified workflow in one program. You can extend Emacs to work the way you want, bending it to suit your own workflow. The result is a comfy working environment for you, from you. Note taking, tracking your TODO list, version control, coding, building, running, terminal emulator, reading the docs, etc. can be done inside Emacs. The meme of called Emacs an OS comes from this scenario, you want to live in Emacs because everything fit so well together, they are all work the exact way you want them to work. Compare to the chaos, program-specific quirks and flaws, each with its own behavior and keybindind (if any) of non-Emacs workflow, Emacs is like a safe heaven for your soul.
Carson Rogers
Is there a way to add elisp code completion to eval-expression (M-:) in the minibuffer?
Isaac Clark
it's there by default, press TAB or C-M-i
Hudson Flores
Unironically try microsoft's code editor, it's the pinnacle of productivity since it can have vim keybinds, all the extensions you would ever need for doing the job, and the support of the most popular product in its field, of the standard. Don't fall for the meme you don't 'get'.
Robert Young
>some EMMS variables literally don't work unless you use customize what? how does this work?
Dominic Watson
any examples?
Samuel Campbell
set emms-player-mpv-update-metadata to t, then try listening to internet radio. the metadata won't update. it only works if you use custom-set-variable.
Custom isn't just a prettier UI for setting variables. It didn't work because setting the variable directly doesn't run the custom variable's setter. git.savannah.gnu.org/cgit/emms.git/tree/emms-player-mpv.el?h=9#n149 I think you could also try setting the variable before loading EMMS.
Owen Howard
(define (total-file-size file-name) "Return the size in bytes of the files under FILE-NAME (similar to `du --apparent-size' with GNU Coreutils.)"
(define (enter? name stat result) ;; Skip version control directories. (not (member (basename name) '(".git" ".svn" "CVS")))) (define (leaf name stat result) ;; Return RESULT plus the size of the file at NAME. (+ result (stat:size stat)))
;; Count zero bytes for directories. (define (down name stat result) result) (define (up name stat result) result)
;; Likewise for skipped directories. (define (skip name stat result) result)
;; Ignore unreadable files/directories but warn the user. (define (error name stat errno result) (format (current-error-port) "warning: ~a: ~a~%" name (strerror errno)) result)
(file-system-fold enter? leaf down up skip error 0 ; initial counter is zero bytes file-name))
Michael Price
lisped
Brody Ross
Does anyone know how to disable evil mode for tetris specifically? I'm tired of manually entering INSERT whenever I restart tetris.
Witchmacs is 3 years out of date. Yukimacs is the closest we have to a spiritual successor.
It has a few things going for it: -most of the extensions are easy to set up, once you know elisp -there are enough of said extensions to do almost anything you want, and they tend to be of an excellent quality (magit for instance is the best git interface out there, org/-roam is superlative for note taking and time management) -you can automate almost anything you want and bind it to a key through elisp -it's portable to almost any operating system, so you only need to download one piece of software to have your entire dev environment up and running
There are only really two things that I don't like about it: -elisp needs a few things to be as good as other lisps (set lexical binding) -it's slow and single threaded (only a problem in certain modes, but it can get quite bad)