|
Atlas Air posted:Every time I compile latex, I have to save the file, press enter etc. Is there a how to make emacs do all this automatically? I might not be understanding your question quite right, but I make pretty heavy use of 'shell-command for something like this. I have a little function called "command-runner" that does this: code:
|
# ? Mar 31, 2013 00:50 |
|
|
# ? May 26, 2024 02:37 |
|
Everything you asked about is customizable in the compile command. The customization variables affect the whole session, so I don't recommend setting them permanently in .emacs. However you can define commands to toggle them as needed.Lisp code:
|
# ? Mar 31, 2013 04:01 |
|
You can also set them as file local variables, if you're mainly running compile from one file.
|
# ? Mar 31, 2013 04:52 |
|
BusError posted:I might not be understanding your question quite right, but I make pretty heavy use of 'shell-command for something like this. I have a little function called "command-runner" that does this: Very cool! How do you set the variable? (I'm very new to emacs)
|
# ? Mar 31, 2013 13:12 |
|
Atlas Air posted:Very cool! How do you set the variable? (I'm very new to emacs) There is most likely a better way to do this, but here's what I do: code:
Like I said, this may not be the best way of accomplishing this goal, but I use it all the time and it works well for me edit to add: I stole this idea from Gary Bernhardt's Destroy All Software screencasts. He uses Vim, but the technique is pretty similar to this. BTW, if you are a programmer you should totally check out his videos. BusError fucked around with this message at 19:23 on Mar 31, 2013 |
# ? Mar 31, 2013 19:18 |
|
I just discovered how powerful YAsnippets can be, I was having to do a lot of repetitive work for Uni (we have a bunch of small hand-ins this semester) and I decided to look into templates, turns out YAsnippets just does cool stuff with fields and elisp code. I spend like 2 hours today figuring out how to do something, and I ended up actually learning a few things about elisp. I love when a simple challenge ends up brightening my whole day. Sharing of my *Scratch* hiding technique: Lisp code:
I also fiddled with kbd today, turns out it will return exactly what "C-ø" means so that I don't have to have anything ugly in my emacs file.
|
# ? Mar 31, 2013 22:16 |
|
Mr. Fish posted:(bury-buffer)
|
# ? Apr 1, 2013 06:12 |
|
Iv got a bit of a daft question if anyone has the time to help me out. Iv just installed Emacs on a windows machine and I'm having trouble compiling C++ programs. As far as I can tell it is something to do with the compiler (make-k, I understand this is for Linux) what I'm struggling with is how to change the compiler that Emacs is using. In short does anyone know how to change the compiler Emacs uses for C++?
|
# ? Apr 4, 2013 20:16 |
|
Putting (setq compile-command "something or other") in your config changes the default command line, for all languages. It can be customized for particular language modes, and the documentation of the compile-command variable describes how, but this requires detailed elisp coding. In your case you would customize c++-mode-hook instead of c-mode-hook.
Gazpacho fucked around with this message at 21:20 on Apr 4, 2013 |
# ? Apr 4, 2013 20:35 |
|
I'm thinking about dumping in the time to learn emacs, but there's something specific I'm looking for. I do a lot of programming in embedded C, and basically I want my editor to do this sort of thing: But for C. I know the latter comes from CEDET, but is setting that up to work on Windows with a special microcontroller standard library going to make me want to gouge my eyes out? In an ideal world, it would work with Doxygen comments to supply stuff like in the first screenshot and work with Python too, but I'll take what I can get.
|
# ? Apr 4, 2013 22:47 |
|
I wrote the auto-complete backend for ropemacs. I don't know the status of it today (some dude on GitHub was going to try to upstream it, but I lost track of that). auto-complete is fairly complicated and tends to be slow. I'd recommend against using it unless you tweak it properly. It's probably possible to write a CEDET backend for it, but it'd require some elisp knowledge.
|
# ? Apr 5, 2013 01:51 |
|
Has anyone messed around with any of the Vim emulation packages in Emacs? I've been wanting to learn more about Vim, both for when I'm on a server with no Emacs and also just to broaden my editing horizons. vi-mode seems to not really have any of the cool stuff I've seen pro Vim users use, so I think that's out. Any experience with stuff like evil?
|
# ? Apr 8, 2013 22:00 |
|
BusError posted:Has anyone messed around with any of the Vim emulation packages in Emacs? I've been wanting to learn more about Vim, both for when I'm on a server with no Emacs and also just to broaden my editing horizons. vi-mode seems to not really have any of the cool stuff I've seen pro Vim users use, so I think that's out. Any experience with stuff like evil? If I were you I'd seriously just use vim proper. I can't imagine any other way of 'learning more about Vim' would be more effective than that. I'm an rear end in a top hat so I suggest taking a quick—a very quick—look at nvi to understand exactly what vim brings to the table, also people seem to like this StackOverflow answer. See what you made me did? You made me link to StackOverflow. I hope you're loving happy. EDIT: That's brew install nvi for you Apple freaks. Dunno what the equivalent is on any other OS. Catalyst-proof fucked around with this message at 22:10 on Apr 8, 2013 |
# ? Apr 8, 2013 22:04 |
|
horse mans posted:If I were you I'd seriously just use vim proper. I can't imagine any other way of 'learning more about Vim' would be more effective than that. I'm an rear end in a top hat so I suggest taking a quick—a very quick—look at nvi to understand exactly what vim brings to the table, also people seem to like this StackOverflow answer. See what you made me did? You made me link to StackOverflow. I hope you're loving happy. haha fair enough on the learning through immersion part. I think deep down I realize I should just dive in, I am just dreading how awkward and slow I'll feel at first. But my question still stands of whether or not anyone's messed with those modes. Beyond just learning vim, I'm curious about the parts they get right and where they fall flat.
|
# ? Apr 9, 2013 18:35 |
|
BusError posted:Has anyone messed around with any of the Vim emulation packages in Emacs? I've been wanting to learn more about Vim, both for when I'm on a server with no Emacs and also just to broaden my editing horizons. vi-mode seems to not really have any of the cool stuff I've seen pro Vim users use, so I think that's out. Any experience with stuff like evil? I've used Vim exclusively for the last couple of years, but I just recently switched to emacs after reading about some of the advanced features and modes available. I use evil all the time, it works perfectly and is well maintained, though you need a couple of other config changes to make it totally feel like vi. I mapped Esc to totally kill any command anywhere, so it's now pretty much identical to Vim when I'm not using one of the fancy modes. All the vim commands I commonly used are emulated with the exact same syntax. As I use it, it looks like Vim, but with better file and directory management, more features (the regex replace in evil visually shows you the changes as you type the command), and better written extension scripts.
|
# ? Apr 9, 2013 19:22 |
|
wooger posted:I've used Vim exclusively for the last couple of years, but I just recently switched to emacs after reading about some of the advanced features and modes available. Cool, thanks for the report. I may mess around with evil-mode a bit this weekend
|
# ? Apr 13, 2013 03:10 |
|
orphean posted:I'm glad I'm not the only one who doesn't care for nxHtml. I have some mental block when trying to use that drat thing. For just multiple mode support without alot of the extra cruft check out MultiWebMode (https://github.com/fgallina/multi-web-mode) Basically to use it you just setup a plist where the label is the name of the mode you want to use and the value is a regex telling it how to recognize the region for that mode. This is all documented. As a plus you can use whatever major-mode you want for each thing easily. Want js2-mode for javascript? Go for it. Want some funky custom mode for css? Sure, why not. Etc. This is from a hell of a while back, but do you actually use js2-mode with multi-web-mode? Could you let me know where you installed both from and what your configuration looks like? The latest version of js2-mode I have is from 2013, and it still has a comment to the effect of "this does not yet work with multi-mode modes", and when using it I just get a bunch of red-highlighted code and the error 'Unexpected end of file'.
|
# ? Apr 16, 2013 09:33 |
|
What is the difference between emacs-auto-save-directory and .emacs.d/auto-save-list?
|
# ? Apr 17, 2013 09:21 |
|
The latter is a file that emacs uses to track files that have been auto-saved successfully so they can be recovered following a crash. The former is, I'm guessing, the directory where emacs has been set up to place the actual auto-saved files on your system.
Gazpacho fucked around with this message at 08:30 on Apr 18, 2013 |
# ? Apr 18, 2013 08:27 |
|
So the other day I upgraded to emacs24 - had to build from source because aptitude is stuck on 23. And yesterday I was doing some TeX editing and realized I didn't have AUCTeX. "Gee", I thought, "maybe I should use this package manager thing that I basically specifically installed emacs24 for." So I did. And then AUCTeX wouldn't work still. And I couldn't find a reason until, while reading the doc, I realized that the "base" .el file, the one you have to load to make it all work, is named texsite.el for some reason. Lo and behold, if you change texsite.el to be auctex.el, the same as the package name, poo poo Just Works. Am I wrong about that? Did I accidentally fix it some other way? Because if I'm not, why the gently caress don't the auctex folks just name their goddamn file auctex.el so it doesn't break ELPA?
|
# ? Apr 18, 2013 15:09 |
|
If anybody is using Org Mode, they just released the next major version (8.0): http://orgmode.org/Changes.html Unfortunately it looks like the bulk of the changes are to features I didn't really use, although I am kind of excited about the RSS export feature. I've been playing around with static site generators for my blog and haven't really been satisfied, so I might give Org a shot for that purpose next.
|
# ? Apr 19, 2013 20:02 |
|
Is there any way to copy a buffer-local variable to another buffer? EDIT: Nevermind, dumb question. Catalyst-proof fucked around with this message at 14:51 on Apr 23, 2013 |
# ? Apr 23, 2013 14:46 |
|
So, what completion engines are people running here that they are happy with? I've been using Helm (was: Anything) for more than a year now and am pretty content with it. I'm also still using auto-complete.el and Slime's own fuzzy completion (because ac-slime was slow as gently caress) and once I have consolidated the latter two into Helm it should all feel a little more consistent. The one thing I would like is for the Helm buffer to open in the biggest available other-window, but I haven't been able to write a correct elisp function for that. (Written on mobile so I can't be bothered to check for the correct names and provide URLs, sorry...)
|
# ? Jun 3, 2013 19:24 |
|
aerique posted:So, what completion engines are people running here that they are happy with? I just use hippie complete, mostly using dabbrev expand.
|
# ? Jun 4, 2013 11:59 |
|
I'm trying to use electric-layout-mode in C, but I can't figure out how to set it up. Here's the documentation:C-h a electric-layout-rules posted:Documentation: I tried: code:
|
# ? Jun 6, 2013 00:29 |
|
I'm not sure why you're getting a syntax error, but you need characters and symbols rather than strings.code:
|
# ? Jun 9, 2013 01:51 |
|
This is cute, changing values with the mouse: http://nullprogram.com/blog/2013/06/07/ Although I've found (with playing with Unity lately and preferring haXe) that I'm much more of a 'code' person and less visually inclined than I thought.
|
# ? Jun 10, 2013 10:43 |
|
Has anyone taken a look at web-mode.el? I'm a lazy gently caress and I want to know if it works with js2-mode.
|
# ? Jun 10, 2013 11:03 |
|
I've got a problem with for loops in eshell. If I do: code:
code:
Googling hasn't helped much, anyone got an idea?
|
# ? Jun 13, 2013 10:47 |
|
I don't have gnuplot installed, but I can do the following just fine:code:
Running GNU Emacs 24.2 on MacOS 10.6.8 here.
|
# ? Jun 22, 2013 07:36 |
|
h_double posted:What happens if you leave out the 1> and 2> redirects? Does gnuplot STDOUT/STDERR report anything interesting? No, it just reports some default progress on the script. (BTW. Your cat example worked fine for me as well.) Oh well, nevermind. The case I needed it for at work is in the past now so it isn't really relevant anymore. I switched to using multi-term.
|
# ? Jun 24, 2013 08:01 |
|
aerique posted:The one thing I would like is for the Helm buffer to open in the biggest available other-window, but I haven't been able to write a correct elisp function for that. I managed to get this working. If anyone's interested I can put the code up on pastebin. I've been meaning to put my config on GitHub but for sharing purposes I don't really like the state my config is in.
|
# ? Jul 17, 2013 21:51 |
|
aerique posted:I managed to get this working. If anyone's interested I can put the code up on pastebin. Definitely throw it up on Gist or something. It's always good to have it out in the open, in case anyone needs it later. I hate the state my config is in. I keep meaning to declare Emacs config bankruptcy, but I just haven't gotten around to it That's like a major weekend project.
|
# ? Jul 17, 2013 23:07 |
|
I spent a ton of time a few months ago building a config with sensitive info (i.e., IP addresses, user names) in one file and the generic stuff in another, just so I could put it up on github or bitbucket or whatever. Still haven't done it. I even set things up in org-mode.
|
# ? Jul 18, 2013 02:30 |
|
pgroce posted:I spent a ton of time a few months ago building a config with sensitive info (i.e., IP addresses, user names) in one file and the generic stuff in another, just so I could put it up on github or bitbucket or whatever. Still haven't done it. I've been tempted to redo my config in org-babel like Sacha Chua did: https://dl.dropboxusercontent.com/u/3968124/sacha-emacs.html (from: http://sachachua.com/blog/2012/06/literate-programming-emacs-configuration-file/) However, just separating the sensitive stuff from the other config options is something I should have done long ago and would give me immediate benefits.
|
# ? Jul 18, 2013 08:11 |
|
In terms of emacs.d customization, this is one of the best things I've ever done.Lisp code:
This unfortunately does not have some kind of mechanism for customizations you want shared between computers. You can also do this for the different operating systems you run Emacs on (i.e. OS X versus Linux), although I do that on the function level: Lisp code:
Catalyst-proof fucked around with this message at 12:44 on Jul 18, 2013 |
# ? Jul 18, 2013 12:40 |
|
horse mans posted:EDIT: Oh hey I typed all this up and turns out we've already discussed per-machine configs in this thread. Not only that, my Sacha Chua emacs-org-config suggestion apparently came from this thread as well Those per-machine configs are nice though. I feel some config work coming up in the near future.
|
# ? Jul 18, 2013 13:07 |
|
Emacs defaults to not distinguishing between C-i and <tab> for the sake of 1980s terminal users. I found this out today fighting with completion keybindings. Everyone who reads this thread should fix this right now because ugh Lisp code:
My normal display font doesn't cut it on a 1280x800 display 10" from my face. Lisp code:
|
# ? Aug 14, 2013 19:04 |
|
Why are you using fixed pixel sized fonts in the year of our lord two thousand and thirteen?
|
# ? Aug 14, 2013 19:31 |
|
|
# ? May 26, 2024 02:37 |
|
If anyone is familiar enough with the autocomplete from http://cx4a.org/software/auto-complete/ I have a couple of questions I couldn't answer from the manual: 1) elisp has quick help popups that describe the selected autocomplete candidate. Is there a way to do this for other languages? 2) Many of the completions have a single letter on the right side, such as 'a', 'd', 'f', or 's'. What do these letters mean?
|
# ? Aug 15, 2013 17:44 |