|
probably C:\Windows\system32\drivers\etc\hosts
|
# ? Jan 20, 2015 07:01 |
|
|
# ? May 10, 2024 16:56 |
|
tak posted:probably C:\Windows\system32\drivers\etc\hosts Unfortunately, for plink it's not that simple, since plink's session names (which emacs uses for the host name part of the TRAMP path) aren't necessarily related to the server's host name; they're just arbitrary names you type into putty. They're also stored in the Windows registry, but I think you can make them be stored in a file instead.
|
# ? Jan 20, 2015 07:25 |
|
Ahh, right. Well, I'm not sure what else you could try, I don't have much experience with using plink with tramp-mode. Is using openssh for tramp-mode an option (via cygwin)? That might be easier in the end. You should be able to put ssh.exe and cygwin1.dll in the emacs bin directory to get that to work without messing with the rest of your environment.
|
# ? Jan 20, 2015 21:36 |
|
I have a Windows 8 VM and was able to write some elisp that grabs hostnames from the registry where Putty stores them (after Google told me where that was). Here's a gist. I wasn't able to get tramp configured to hook in the completion there, but you could try this function out in emacs to see what it returns for you and maybe try hooking it into tramp's completion.
|
# ? Jan 21, 2015 06:28 |
|
Emacs is pretty cool but this is a dumb thing to do: http://www.howardism.org/Technical/Emacs/new-window-manager.html since you could do all the same poo poo by running xmonad or whatever, at least that would let your Firefox windows go full-screen and allow you to switch between browser and emacs without closing the browser every time. I think his eshell-here thing is pretty neat though: http://www.howardism.org/Technical/Emacs/eshell-fun.html It's inspired me to try integrating eshell and dired a bit more rather than relying on external xterms all the time.
|
# ? Jan 22, 2015 01:50 |
|
Pham Nuwen posted:Emacs is pretty cool but this is a dumb thing to do: http://www.howardism.org/Technical/Emacs/new-window-manager.html since you could do all the same poo poo by running xmonad or whatever, at least that would let your Firefox windows go full-screen and allow you to switch between browser and emacs without closing the browser every time. Saw that first link the other day on HackerNews. This guy is a bit OTT, but I like the concept. I just have a workspace / monitor dedicated to emacs fullscreen, and use that for all text & shell work, with browsers / office tools / gui stuff elsewhere. Any workspace enabled window manager is fine though. I use emacs on Windows at work, in lieu of a proper Unix environment, and use the msys GNU tools (they come with Git) + eshell + tramp to accomplish most things. It's not ideal, but it works. For the guys above messing with putty, plink & trump, I'd definitely recommend switching to proper OpenSSH and spending a little while making a nice ssh.conf. Reading the comments there, I did find an interesting new emacs addon /alternative distribution called Spacemacs. https://github.com/syl20bnr/spacemacs "Spacemacs is a user-friendly and well-documented Emacs kit that integrates the best Emacs packages out there. It uses Evil Mode to combine the ergonomic editing features of Vim with the extensibility of Emacs." As an exclusive evil-mode user, this really looks like it could be of value, though I've only just started playing around really. I get the sense that they've bundled a few too many tools by default. I only switched from vim a year or two back, but my init.el has a bunch of stuff in it. Oddly, Spacemacs arrives at a very similar solution to my own one to enhance ergonomics: They use vim leader to make all commands accessible via a press on the space bar. In my init.el: In evil normal mode, the space bar sends C-x, and the ; key sends M-x. So combined with evil, I almost never have to chord.
|
# ? Jan 25, 2015 13:04 |
|
wooger posted:"Spacemacs is a user-friendly and well-documented Emacs kit that integrates the best Emacs packages out there. It uses Evil Mode to combine the ergonomic editing features of Vim with the extensibility of Emacs." For me as someone who has only worked with Vim and always kinda enviously looked at all the cool Emacs modes, Spacemacs really made the switch easy. I love it.
|
# ? Jan 25, 2015 13:38 |
|
wooger posted:As an exclusive evil-mode user, this really looks like it could be of value, though I've only just started playing around really. I get the sense that they've bundled a few too many tools by default. I get the feeling that usually fits most of these bundles (oh-my-zsh is another one that comes to mind). I like to have a look at them and see how they solve particular problems, and I tend to find an interesting or useful solution to a problem I have as well (or that I didn't even know I have had until then ); yet there are always so many things in there that seem counterintuitive, that I would never use or which I don't understand which make me hesitant to "just use" them.
|
# ? Jan 25, 2015 14:25 |
|
If I put (toggle-scroll-bar -1) in my .emacs on my mac, emacs starts freaking out. Files not displayed properly, a second window bar pops up in the center of the buffer, etc. Is that function obsolete, or is it just a bug? I'm usually in org-mode, so maybe that's related, dunno.
|
# ? Feb 3, 2015 10:18 |
|
midnightclimax posted:If I put (toggle-scroll-bar -1) in my .emacs on my mac, emacs starts freaking out. Files not displayed properly, a second window bar pops up in the center of the buffer, etc. I'm not sure about the use of that function; I'd just customize the value of scroll-bar-mode (nil for no scroll bars).
|
# ? Feb 3, 2015 11:00 |
|
horse mans posted:I'm not sure about the use of that function; I'd just customize the value of scroll-bar-mode (nil for no scroll bars). Using that I get exactly the same display errors.
|
# ? Feb 3, 2015 11:10 |
|
midnightclimax posted:Using that I get exactly the same display errors. Then I imagine it's not the scroll-bar which is the problem. Try removing things from your init.el to see if you can narrow it down, or try remove the scrollbar after emacs -Q to see what happens with no custom packages or elisp loaded.
|
# ? Feb 3, 2015 12:58 |
|
It might also help to enable debugging via (setq debug-on-error t), just to see whether something obviously throws an error right that moment. → https://www.gnu.org/software/emacs/manual/html_node/elisp/Error-Debugging.html
|
# ? Feb 3, 2015 13:03 |
|
You could try:Lisp code:
|
# ? Feb 3, 2015 13:31 |
|
Hollow Talk posted:It might also help to enable debugging via (setq debug-on-error t), just to see whether something obviously throws an error right that moment. Hmm well that didn't show anything. Unless it outputs to some file I can't find. horse mans posted:Then I imagine it's not the scroll-bar which is the problem. Try removing things from your init.el to see if you can narrow it down, or try remove the scrollbar after emacs -Q to see what happens with no custom packages or elisp loaded. Ok I'll try that later.
|
# ? Feb 3, 2015 13:53 |
|
midnightclimax posted:Hmm well that didn't show anything. Unless it outputs to some file I can't find. Hmpf, that's interesting. Errors bring up a new frame with debugging enabled, so you didn't miss anything.
|
# ? Feb 3, 2015 13:58 |
|
Ok, figured it out. (if (window-system) (set-frame-size (selected-frame) 90 50)) caused the problem, since the 50 went over the dock, only it didn't show. It looked like it stopped before the dock. So I reduced it to 45, and voila, everything works. What a dumb bug.
|
# ? Feb 3, 2015 16:25 |
|
If I have a vertical window split, file on the left, bookmark list on the right, is it possible to navigate through the bookmarks, but only open them in the left pane?
|
# ? Feb 6, 2015 20:41 |
|
I'm currently playing around with Icicles, which makes me wonder, are there any libraries that you would consider essential?
|
# ? Feb 11, 2015 15:13 |
|
midnightclimax posted:I'm currently playing around with Icicles, which makes me wonder, are there any libraries that you would consider essential? You might want to check out helm before investing too much time in Icicles.
|
# ? Feb 11, 2015 15:48 |
|
If you write any elisp, there's really no reason IMO not to use s.el and dash.el. There are a million replacements for the default "find files/buffers" behavior (particularly ido and helm), but which of those replacements is best is a personal/religious choice. I always change the default behavior, however, even if only to use iswitchb (er, I guess Icomplete now.)
|
# ? Feb 11, 2015 18:06 |
|
Ok, checked out helm. Pretty cool, shelving icicles for now.
|
# ? Feb 12, 2015 14:27 |
|
brae posted:I have a Windows 8 VM and was able to write some elisp that grabs hostnames from the registry where Putty stores them (after Google told me where that was). Sorry for taking so long to reply, but this is definitely a good start. I haven't gotten it working yet either, but this at least points me in the right direction. If I figure it out, maybe I can host it on MELPA or something... EDIT: Ok, this is really weird. It looks like emacs already has support for autocompletion for plinkx via tramp-parse-putty, but it's not working for some reason... EDITx2: So far, I've narrowed the issue down to (find-file-name-handler "/" 'file-name-all-completions) returning nil on Windows, but tramp-completion-file-name-handler on Linux. Avenging Dentist fucked around with this message at 00:10 on Feb 13, 2015 |
# ? Feb 12, 2015 18:12 |
|
I'm to the place in my Emacs learning that I never use the arrow keys on my keyboard. The built in tutorial is really good! Its so bad that I'm trying to use emacs chords right now to move the cursor around. I primarily work in Python right now, can you guys suggest some Python resources for Emacs or point me in towards the next thing to learn like multi-file editing?
|
# ? Feb 12, 2015 20:25 |
|
Check elpy out if you haven't already. Some of what it does is IDE-ish (e.g., code completion via Company) but you don't have to use that. I like using the flymake integration (via pyflakes) to spot obvious errors before I start running the code, and loading my buffer automatically into a Python REPL buffer so I can play around and understand just what my code is doing as I write it. If you don't need any of that, the regular python-mode is reasonable enough. Indentation modes for whitespace-delimited languages tend to be awful; python-mode is merely meh.
|
# ? Feb 12, 2015 20:55 |
|
Ok, I finally figured it out: emacs on Windows takes a "/" and converts it to a Windows-style path (e.g. "C:/"), which TRAMP tries to detect with a regexp in file-name-handler-alist, but the regexp is wrong. Replacing it like so gives me autocompletion of host names: code:
Avenging Dentist fucked around with this message at 05:30 on Feb 13, 2015 |
# ? Feb 13, 2015 00:51 |
|
pgroce posted:Check elpy out if you haven't already. Some of what it does is IDE-ish (e.g., code completion via Company) but you don't have to use that. I like using the flymake integration (via pyflakes) to spot obvious errors before I start running the code, and loading my buffer automatically into a Python REPL buffer so I can play around and understand just what my code is doing as I write it. This is awesome! Wow, thanks so much for the help. Is the process the same for adding similar functionality for other languages, or is Python special because, well, its Python and everyone loves it?
|
# ? Feb 13, 2015 20:38 |
|
duck hunt posted:This is awesome! Wow, thanks so much for the help. Is the process the same for adding similar functionality for other languages, or is Python special because, well, its Python and everyone loves it? I don't know how well I'm answering your question, but here's a big long effortpost about programming language support in Emacs. Language support isn't very standard in Emacs, but there are commonalities. You'll see company mode and flycheck support for a lot of different languages, for instance. The main way Emacs offers language support is as major modes. Almost every language has a major mode either built-in or easily installable from the internet. What they do and how useful they are varies a lot. When you first use a mode, type C-h m (or M-x describe-mode) and read over its documentation and the keys it describes. There are often lots of good features there that you didn't know about. Several projects take Elpy's general approach -- that is, start a subprocess running the language interpreter and get language-specific information from there. AFAIK, the first was SLIME, which did it for non-Emacs lisps. (It was trying to make Emacs as friendly to other lisps as it was to elisp itself, so maybe you can say elisp came first.) CIDER does this for Clojure, and it's awesome. I googled around and found analogous projects for Ruby and Perl, but I don't know what their quality is like. They'd all be fairly different to install, configure and use, however. SLIME is a giant PITA, for instance. Other packages take totally different approaches. CEDET, for C++, is largely it's own thing. At the other end of the spectrum is stuff like Skewer. Finally: Most of the time you don't need all this crap. And trying to keep all the parts moving can be more effort than it's worth. For that reason, I suggest you start with the minimal tooling Emacs gives you, and ramp things up as things annoy you. Getting pissed at something and changing it is the Emacs way.
|
# ? Feb 13, 2015 22:17 |
|
duck hunt posted:Is the process the same for adding similar functionality for other languages, or is Python special because, well, its Python and everyone loves it? It different for each language.
|
# ? Feb 13, 2015 22:18 |
|
There are a ton of these projects to talk down a pipe to a language-specific process. They're usually minor modes, rather than major modes. SLIME is an exception to that rule, if i recall correctly For example, in ruby, there is a major mode to handle syntax highlighting and indentation (enh-ruby-mode), then a minor mode (robe-mode) to talk down a pipe to get completion and code re-loading and so on. You should always be using the major mode for every language -- there's pretty much no cost/effort. The minor modes are more effort to set up, but they get you more IDE-like features: code analysis, completion, refactoring The ones I use on a regular basis:
Notorious b.s.d. fucked around with this message at 19:59 on Feb 14, 2015 |
# ? Feb 14, 2015 01:55 |
|
Notorious b.s.d. posted:Knowledge This is pretty good stuff. I wonder if some of this could get shifted into the OP? After all, software development is probably the most common use case.
|
# ? Feb 14, 2015 03:51 |
|
pgroce posted:This is pretty good stuff. I wonder if some of this could get shifted into the OP? After all, software development is probably the most common use case. Can do. Probably should see about cleaning up that terrible post anyway.
|
# ? Feb 16, 2015 12:05 |
|
So, for shiggles, I replaced my .emacs.d with Spacemacs, which is meant to provide a set-and-forget vim environment within Emacs. It's... very painful so far. It's intricately configured and seems to break super easily between revisions, and relies on so many bleeding edge packages that a first run is almost guaranteed to have something not work, which you may or may not be aware of. The navigation scheme for commands is somewhat interesting, though, and it does come packed with a lot of poo poo people should be using in Emacs anyway (helm, projectile, ace, and so on). Has anyone else taken a look at it?
|
# ? Feb 16, 2015 12:27 |
|
horse mans posted:So, for shiggles, I replaced my .emacs.d with Spacemacs, which is meant to provide a set-and-forget vim environment within Emacs. Yep, see my post up above on this very page. I agree with you I think, I'm back to using my own customised evil-mode, but with space mapped as C-x rather than using it as a vim leader key. It's way more complicated than vim by default, but may provide some useful ideas of modules to look at.
|
# ? Feb 16, 2015 12:58 |
|
Talking about adding things to the OP, Planet Emacsen (http://planet.emacsen.org/) is pretty cool if you're just starting out, and want to see what other people are up to.
|
# ? Feb 16, 2015 13:02 |
|
Eh, I just opened a file and realized I must have cut a large chunk without yanking it someplace else. Guess I need to use some kind of versioning control. I'm using Emacs mostly with org to write memos, journals, etc. Do I just use vc git? e: Learned about the way emacs does backups, and customized my .emacs accordingly. midnightclimax fucked around with this message at 12:18 on Feb 22, 2015 |
# ? Feb 22, 2015 09:33 |
|
midnightclimax posted:Eh, I just opened a file and realized I must have cut a large chunk without yanking it someplace else. Guess I need to use some kind of versioning control. I'm using Emacs mostly with org to write memos, journals, etc. Do I just use vc git? Regardless, git works great for org files, since they are plain text. The only problem with running "proper" vc on things like org and LaTeX files is that git (like all vc tools I know) works by lines, which is very useful for programming, but sometimes a bit annoying with text. In the end, all it means however is that you get slightly bigger diff files, and git diff --word-diff can highlight changed words rather than whole lines. I don't use much of the emacs git integration, other than the diff viever (vc-diff) and the history viewer, since I do my commits from the console and then write my commit messages in Emacs. It's worth it, though.
|
# ? Feb 22, 2015 14:49 |
|
There's no reason not to use magit for git in emacs, IMO. Take an hour or two to read through the documentation or a tutorial or two, you won't regret it. It's very nice for constructing commits hunk-by-hunk, and it gives some handy info when making commit messages that summarize the staged changes about to be committed. edit: Notorious b.s.d. posted:Sadly, I don't have a minor mode to provide perl reflection. I've been using Devel::PerlySense lately and it's (fairly) good. It doesn't really act like a standard well-behaved minor mode though -- you have to bind its prefix key globally, due to the way it sets up the keymap. Other than that it's pretty nice. It's the only Perl emacs development environment that seems to be maintained or even working in emacs 24. It's not quite as nice as CEDET/Semantic, but it's better than nothing and does have several things that save a lot of time. This config seems to be working OK for me (adapted from the Devel::PerlySense docs): code:
tak fucked around with this message at 20:58 on Feb 22, 2015 |
# ? Feb 22, 2015 18:50 |
|
Hey I use this line in my .emas to make text bigger:Lisp code:
|
# ? Feb 25, 2015 22:07 |
|
|
# ? May 10, 2024 16:56 |
|
PlesantDilemma posted:Hey I use this line in my .emas to make text bigger: This is a stupid question, but have you tried changing the number to be bigger on your Mac (like evaluating: Lisp code:
|
# ? Feb 26, 2015 00:00 |