Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

bollig posted:

Long story short, I want to keep the VIM keybindings (at least for text editing/coding) but want to do the emacs poo poo.

Why do you want to force emacs into vi keybindings? You'll get a subpar experience of both.

Just use emacs as Steele and Moon decreed, and all shall be good.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

eschaton posted:

Why do you want to force emacs into vi keybindings? You'll get a subpar experience of both.

Just use emacs as Steele and Moon decreed, and all shall be good.

No just use spacemacs because it does a really good job of making emacs work with vim keybindings.

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

eschaton posted:

Why do you want to force emacs into vi keybindings? You'll get a subpar experience of both.

Just use emacs as Steele and Moon decreed, and all shall be good.

How will it be a subpar experience?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Flat Daddy posted:

How will it be a subpar experience?

Let's say you start using a new mode because you're learning a new language or something. Among other things it'll have its set of key bindings to learn. They'll probably build on existing emacs bindings.

In cases where they're literally building on emacs bindings, they'll probably be adapted automatically to your vi-compatible bindings.

In cases where they're only doing so figuratively though, you'll have this mismatch between how you're used to doing things and how the new thing expects you to work.

If you stay in the emacs world, this won't happen.

aerique
Jul 16, 2008

eschaton posted:

Let's say you start using a new mode because you're learning a new language or something. Among other things it'll have its set of key bindings to learn. They'll probably build on existing emacs bindings.

I've rarely found this to be an issue.

The bindings that come with modes are almost universally crap just like the default Emacs bindings are and you'll never use all the bindings that come with a mode anyway.

Just "C-h m" and bind the ones you need to something useful.

Deus Rex
Mar 5, 2005

I know both emacs and vim pretty well, and it's super annoying when I have evil-mode on and something like a compilation mode buffer pops up, and hitting "q" to dismiss it via quit-window ends up recording a keyboard macro instead. I know I could configure evil-mode to do things the way I like, but :effort:.

It's frustrating because vim is so much better at actually editing text, but emacs is better in every other way as a programming tool. Oh well.

midnightclimax
Dec 3, 2011

by XyloJW
I've copied my .emacs.d to a new machine, but the startup is considerably slower. Is it necessary to start with a fresh .emacs.d anyway? Maybe that's a rookie mistake.

pgroce
Oct 24, 2002

midnightclimax posted:

I've copied my .emacs.d to a new machine, but the startup is considerably slower. Is it necessary to start with a fresh .emacs.d anyway? Maybe that's a rookie mistake.

The only issues you might run into that I know of would be the usual user/permissions issues you get with all files, plus potential brokenness from trying to run bytecode compiled on another machine (which shouldn't really be an issue) or Emacs version (this might).

That said, most of the time you'll only need the stuff out of .emacs.d that you've put in there -- usually just the config files. If you use a few packages from elpa or whatever, just install them manually in the new place. If you use a lot, maybe look into calling package-install in your config on the packages you need before you configure them. (One nifty way to do this is via use-package, but it might also be overkill.)

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Deus Rex posted:

I know both emacs and vim pretty well, and it's super annoying when I have evil-mode on and something like a compilation mode buffer pops up, and hitting "q" to dismiss it via quit-window ends up recording a keyboard macro instead. I know I could configure evil-mode to do things the way I like, but :effort:.

It's frustrating because vim is so much better at actually editing text, but emacs is better in every other way as a programming tool. Oh well.

You can just set evil to put you in a different evil mode (like emacs-mode) in buffers with the modes like you describe.

It takes about twenty seconds to add a new mode to the list once you've got the thing written.

If you're :effort:ing about having to tweak your init.el a little to make emacs behave like you want, then emacs isn't for you. :)

I just got used to typing "iq" instead...

midnightclimax posted:

I've copied my .emacs.d to a new machine, but the startup is considerably slower. Is it necessary to start with a fresh .emacs.d anyway? Maybe that's a rookie mistake.

I check out my git repo with a metric ton of self-written elisp code on every machine I install emacs on. I'm certainly not going to redo all the work I did customizing it the first time.

Try M-x byte-compile-directory on your .emacs.d.

Dessert Rose fucked around with this message at 19:29 on May 11, 2015

jony neuemonic
Nov 13, 2009

Deus Rex posted:

I know both emacs and vim pretty well, and it's super annoying when I have evil-mode on and something like a compilation mode buffer pops up, and hitting "q" to dismiss it via quit-window ends up recording a keyboard macro instead. I know I could configure evil-mode to do things the way I like, but :effort:.

It's frustrating because vim is so much better at actually editing text, but emacs is better in every other way as a programming tool. Oh well.

I threw this in my config and it's solved most of those problems:

code:
(dolist (mode-map '((comint-mode . emacs)
		    (eshell-mode . emacs)
		    (fundamental-mode . emacs)
		    (git-commit-mode . insert)
		    (git-rebase-mode . emacs)
		    (help-mode . emacs)
		    (term-mode . emacs)))
  (evil-set-initial-state `,(car mode-map) `,(cdr mode-map)))
Not mine originally, but I can't remember the source to link it.

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

eschaton posted:

Let's say you start using a new mode because you're learning a new language or something. Among other things it'll have its set of key bindings to learn. They'll probably build on existing emacs bindings.

In cases where they're literally building on emacs bindings, they'll probably be adapted automatically to your vi-compatible bindings.

In cases where they're only doing so figuratively though, you'll have this mismatch between how you're used to doing things and how the new thing expects you to work.

If you stay in the emacs world, this won't happen.

Yeah.. I ran into something like this today with occurrences mode in spacemacs. I had to "SPC w w" into the window and "C-x o" out of it :gibs:

I just started using it today and besides this issue, it seems really nice. At the very least it's teaching me about emacs plugins I should've been using this whole time.

Flat Daddy fucked around with this message at 04:13 on May 12, 2015

Deus Rex
Mar 5, 2005

Dessert Rose posted:

You can just set evil to put you in a different evil mode (like emacs-mode) in buffers with the modes like you describe.

It takes about twenty seconds to add a new mode to the list once you've got the thing written.

If you're :effort:ing about having to tweak your init.el a little to make emacs behave like you want, then emacs isn't for you. :)

I have a ~800 SLOC .emacs.d directory and I know my way pretty well around Emacs Lisp. It's just that configuring this one thing is such a stupid pain to me, because I'm constantly discovering new modes where I get tripped up. Whatever.


fidel sarcastro posted:

I threw this in my config and it's solved most of those problems:

code:
(dolist (mode-map '((comint-mode . emacs)
		    (eshell-mode . emacs)
		    (fundamental-mode . emacs)
		    (git-commit-mode . insert)
		    (git-rebase-mode . emacs)
		    (help-mode . emacs)
		    (term-mode . emacs)))
  (evil-set-initial-state `,(car mode-map) `,(cdr mode-map)))
Not mine originally, but I can't remember the source to link it.

Thanks, that's a nice start of modes to disable evil in if I ever give it another shot.

Catalyst-proof
May 11, 2011

better waste some time with you

Flat Daddy posted:

Yeah.. I ran into something like this today with occurrences mode in spacemacs. I had to "SPC w w" into the window and "C-x o" out of it :gibs:

Groady. As if Emacs muscle memory isn't difficult enough :)

bollig
Apr 7, 2006

Never Forget.

Deus Rex posted:


It's frustrating because vim is so much better at actually editing text, but emacs is better in every other way as a programming tool. Oh well.

This is basically where I'm from. And I'm trying to figure out the best way to rectify it. Just running emacs in evil mode is working so well, but I really haven't done all that much.

Catalyst-proof
May 11, 2011

better waste some time with you
I'm trying to write an nnimap-split-fancy function which depends on the list of existing folder names for the account. Is there a function to just get a list of existing group names for a server?

EDIT: Found gnus-groups-from-server, seems to do what I need.

Catalyst-proof fucked around with this message at 00:10 on May 17, 2015

midnightclimax
Dec 3, 2011

by XyloJW
Is there any way to desktop-save follow-mode for a specific frame? I just re-enable it after startup, but there's probably a smarter way to do it.

e: nm just putting it in .emacs does the trick. (I probably was worried it would be global or whatever)

midnightclimax fucked around with this message at 12:37 on May 30, 2015

pgroce
Oct 24, 2002
On June 10, the Marmalade repo's certificate expired. (Yay, encryption everywhere.) Since then, my attempts to update package lists from there have failed. There seems to be no hurry to fix it; I left a bug on Github and, in desperation, even tweeted Nic Ferrier about it. No one cares, I guess.

I've seen no one else talking about this, so I assume there's an easy workaround. (I'm on Emacs 24.4 still, so maybe the answer is "use Emacs 24.5"?) Suggestions would be appreciated.

Hollow Talk
Feb 2, 2014

pgroce posted:

On June 10, the Marmalade repo's certificate expired. (Yay, encryption everywhere.) Since then, my attempts to update package lists from there have failed. There seems to be no hurry to fix it; I left a bug on Github and, in desperation, even tweeted Nic Ferrier about it. No one cares, I guess.

I've seen no one else talking about this, so I assume there's an easy workaround. (I'm on Emacs 24.4 still, so maybe the answer is "use Emacs 24.5"?) Suggestions would be appreciated.

From what I can see, it produces an error with 24.5(.1) as well, so the answer isn't "use Emacs 24.5". :saddowns:

aerique
Jul 16, 2008
Well, I guess there's one advantage to not using the Emacs package manager.

Tetraptous
Nov 11, 2004

Dynamic instability during transition.
Huh. I hadn't noticed myself, but I generally prefer the melpa version of packages over marmalade when there's a choice between the two. Sounds like a pretty serious problem! They should probably fix it!

duck hunt
Dec 22, 2010
I just got a new keyboard from WASD, and it has a switch on the back of the board that you can set to remove caps lock and turn it into Ctrl like the old IBM keyboards. On top of being really well made and great to use, I highly recommend them for emacs work.

wooger
Apr 16, 2005

YOU RESENT?

duck hunt posted:

I just got a new keyboard from WASD, and it has a switch on the back of the board that you can set to remove caps lock and turn it into Ctrl like the old IBM keyboards. On top of being really well made and great to use, I highly recommend them for emacs work.

You can do this in software pretty easily FWIW. However, I've found that moving Ctrl to the alt key, alt to the win key & escape to CapsLock is by far the most ergonomic layout for me. Ctrl on escape is still using the pinky on the left side only far too much.

Caveat: I use evil-mode

Hollow Talk
Feb 2, 2014

wooger posted:

You can do this in software pretty easily FWIW. However, I've found that moving Ctrl to the alt key, alt to the win key & escape to CapsLock is by far the most ergonomic layout for me. Ctrl on escape is still using the pinky on the left side only far too much.

Caveat: I use evil-mode

In true Emacs spirit, one can never have enough modifier keys, so my CapsLock key is bound to Hyper, which gives me Meta (Win), Alt, Ctrl, Shift & Hyper. :colbert:

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
With vim keybindings, C-] also exits insert mode. I rarely use esc for it.

aerique
Jul 16, 2008

Dessert Rose posted:

With vim keybindings, C-] also exits insert mode. I rarely use esc for it.

That's the only downside to being a Lisp hippy and switching the brackets and the parens: no C-] :-(

midnightclimax
Dec 3, 2011

by XyloJW
Anyone using cider? I'm trying to set it up, but get loads of errors. I'm not sure all of that is related to the warning to use lein repl 2.7, since I can't see that stuff in other's peoples complaints about that requirement.

This is what I get when I start it up with cider-inject and hit Enter

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
Kind of looks like you pasted the error message into the REPL input.

Does it work fine after that?

midnightclimax
Dec 3, 2011

by XyloJW

Dessert Rose posted:

Kind of looks like you pasted the error message into the REPL input.

Does it work fine after that?

Yeah that's what I figured. Thing is, when I try to C-x C-e (cider-eval-last-expression) a line in my code, I don't get output in cider/the repl, but just error messages in the mini (?) buffer (the line at the bottom). Can't recall the exact error wording now, I'll edit that in later.

pgroce
Oct 24, 2002
That could also be a bare error message coming from cider-nrepl, and the cider elisp subsequently trying to parse it.

Did you upgrade your nRepl dep as requested, BTW? It's not clear to me from what you've said. I'd get that sorted first, whatever else may be wrong. No misbehavior would surprise me if that isn't working as expected, especially if you're trying to use the debugger.

midnightclimax
Dec 3, 2011

by XyloJW
Ok, the culprit was wrong information in profiles.clj. Basically I followed a step-by-step tutorial, and it apparently hasn't been updated*. Seems to work now, although I'm not a fan of cider changing focus and content of a frame, every time I eval something buggy.


* looking at you, braveclojure.com

MrDoDo
Jun 27, 2004

You better remember quick before we haul your sweet ass down to the precinct.

midnightclimax posted:

* looking at you, braveclojure.com

Wow, this actually looks pretty cool.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
Braveclojure.com is how I got started with Clojure (and emacs, actually). It's really good.

NickPlowswell
Sep 14, 2014

The exoplanet has failed :qq:
I recently started using Emacs about a month ago before that I was using Vim and before that Sublime.

What's the prefered way of keeping things synchronized between installations?

I actively use both Windows and Linux. For now, I keep my .emacs.d folder stored on my second NTFS partition I keep all of my media on. On windows, I have a hardlink to it and another to my Dropbox folder and on Linux a symlink.

This seams robust enough, if I ever need my Emacs configuration elsewhere.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

NickPlowswell posted:

I recently started using Emacs about a month ago before that I was using Vim and before that Sublime.

What's the prefered way of keeping things synchronized between installations?

I actively use both Windows and Linux. For now, I keep my .emacs.d folder stored on my second NTFS partition I keep all of my media on. On windows, I have a hardlink to it and another to my Dropbox folder and on Linux a symlink.

This seams robust enough, if I ever need my Emacs configuration elsewhere.

Source control, man. :cool:

Hollow Talk
Feb 2, 2014

MALE SHOEGAZE posted:

Source control, man. :cool:

This is pretty much the correct answer. Use something like git (or svn or some such), put your config in there, and use something like github, bitbucket (they offer free private repositories) or a server you own to push your configuration. Then clone the repository on your other system, and there you go. The only thing you have to be a bit careful with is to put architecture/OS specific things in there without any kind of test, if-statement etc., since that might break one system while happily working on the other.

tazjin
Jul 24, 2015


Hollow Talk posted:

This is pretty much the correct answer. Use something like git (or svn or some such), put your config in there, and use something like github, bitbucket (they offer free private repositories) or a server you own to push your configuration. Then clone the repository on your other system, and there you go. The only thing you have to be a bit careful with is to put architecture/OS specific things in there without any kind of test, if-statement etc., since that might break one system while happily working on the other.

You can have a snippet like this to keep local configuration (e.g. secrets, OS specific stuff) to a machine. I do this so that I can always keep the rest of the config public.

code:
(let ((local-file "~/.emacs.d/init-local.el"))
  (if (file-exists-p local-file)
      (load local-file)))

Soricidus
Oct 21, 2010
freedom-hating statist shill

tazjin posted:

You can have a snippet like this to keep local configuration (e.g. secrets, OS specific stuff) to a machine. I do this so that I can always keep the rest of the config public.

code:
(let ((local-file "~/.emacs.d/init-local.el"))
  (if (file-exists-p local-file)
      (load local-file)))

You can save yourself a bit of effort if you notice the optional arguments to load:
code:
(load "~/.emacs.d/init-local" t)

midnightclimax
Dec 3, 2011

by XyloJW
Anyone been messing around with EXWM? Sounds crazy. Basically emacs is now a tiling window manager, and every window becomes a buffer.

https://github.com/ch11ng/exwm/wiki

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Soricidus posted:

You can save yourself a bit of effort if you notice the optional arguments to load:
code:
(load "~/.emacs.d/init-local" t)

I also like to have a machine-specific-config dir which has subdirs named corresponding to the output of (system-name) on each machine, which I add to the load list at the top.

Then if I want to override a particular file on a given machine I just add it there and the load call pulls that file instead of the default.

Adbot
ADBOT LOVES YOU

PleasantDilemma
Dec 5, 2006

The Last Hope for Peace
Looks like EmacsConf is this weekend in San Francisco. Anyone going? Seems much of it will be live streamed. I plan to check it out, maybe get a emacs guru to show me how helm mode is installed and used.

http://emacsconf2015.org/

  • Locked thread