emacs

Emacs equivalent of Vim's yy10p ?

How can I copy a line 10 times easily in Emacs? I can't find a copy-line shortcut or function. I can use C-aC-spcC-eM-w to laboriously copy the line but how can I then paste it more than once? Any ideas before I go and write my own functions. ...

How do I get TextMate style quotes in Emacs?

In textmate, when there's a current selection, I hit the " key and the selection gets surrounded by quotes. The same thing happens with other balanced characters like (, {, [ and '. Am I missing something obvious in Emacs configuration that would enable similar behaviour when using transient mark mode, or do I need to break out elisp an...

How do I get a warning before killing a temporary buffer in Emacs?

More than once I've lost work by accidentally killing a temporary buffer in Emacs. Can I set up Emacs to give me a warning when I kill a buffer not associated with a file? ...

How do I duplicate a whole line in Emacs?

I saw this same question for VIM and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs? ...

replace-char in Emacs Lisp ?

[I cannot find a question tagged emacs-lisp, so let's start, it will be the first on StackOverflow.] Emacs Lisp has replace-string but I cannot find a replace-char. If I want to replace "typographic" curly quotes (Emacs code for this character is hexa 53979) with regular ASCII quotes, I write: (replace-string (make-string 1 ?\x53979) "...

Emacs, switch active window

In Emacs, C-x o takes me to the next window. What keyboard macro takes me to the previous window in Emacs? ...

How to write an emacs mode for a new language?

I would like to write an emacs major mode for a 4GL. Can some one show me a tutorial. As far as i googled i was able to find only this broken link http://two-wugs.net/emacs/mode-tutorial.html ...

How do I set the size of emacs' window?

I'm trying to detect the size of the screen I'm starting emacs on, and adjust the size and position the window it is starting in (I guess that's the frame in emacs-speak) accordingly. I'm trying to set up my .emacs so that I always get a "reasonably-big" window with it's top-left corner near the top-left of my screen. I guess this is a ...

Emacs, switching to another frame (Mac OS X)

I can switch between windows with "C-x o", but if I have opened multiple frames, can I move between them without the mouse as well? I just realized that the question probably sounds braindead without this detail: I'm on Mac OS X (Finnish keyboard) and switching between windows of the same application is difficult. ...

Maximizing an Emacs frame to just one monitor with elisp

I use maxframe.el to maximize my Emacs frames. It works great on all three major platforms, except on my dual-head Mac setup (Macbook Pro 15-inch laptop with 23-inch monitor). When maximizing an Emacs frame, the frame expands to fill the width of both monitors and the height of the larger monitor. Obviously, I would like the frame t...

GLSL major mode for emacs?

I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/, but there isn't a lot of description around it, aside that it's "simple". Ideally, I'd like an extension to CcMode that can do it, or at least a mode that can handle auto-styling and has similar shortcuts to CcMode. If there isn't one, any good elisp reference...

Open a file with su/sudo inside Emacs

Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is (require 'tramp) C-c C-f /sudo::/path/to/file but this requires an expensive round-trip through SSH. Is there a more direct way? [EDIT] @JBB is right. I want to be able ...

Getting Started with an IDE?

Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient. To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on. Are there any suggestions for easing the transition over to an IDE. Obviously, some will th...

Vim macros don't work when using viper + vimpulse in emacs.

Any other tweaks for making emacs as vim-like as possible would be appreciated as well. Addendum: The main reason I don't just use vim is that I love how emacs lets you open a file in two different frames [ADDED: sorry, this was confusing: I mean separate windows, which emacs calls "frames"]. It's like making a vertical split but I don...

Why are fixnums in emacs only 29 bits?

And why don't they change it? Edit: The reason ask is because I'm new to emacs and I would like to use Emacs as a "programmer calculator". So, I can manipulate 32-bit & 64-bit integers and have them behave as they would on the native machine. ...

What is the closest thing to Slime for Scheme?

I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main source of discomfort is that I don't have Slime (yes, you may call me ...

How do I enable multimode emacs to program PHP without messing up my indents?

Whenever I indent HTML in PHP mode, emacs (22.1.1, basic install on Redaht Linux over Putty-SSH) pops up a frame and tells me to get MUMODE or somesuch extra add-on. I installed PHP Mode without a big hassle, but I don't know how to get this multi-mode rolling. I'd like to know 2 things How to install and configure multi-mode How to ...

Glasses mode in emacs.

How to customize the color of the symbol inserted in the "glasses mode" in emacs? I have not found the option for this. Can anyone suggest anything? ...

How to get a quick status from the emacs compilation buffer?

By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. This way I can easily get a status of the current compilation by just looking at the compile buffer and seeing ...

Open an Emacs buffer when a command tries to open an editor in shell-mode

I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable VISUAL set to vim I get the following from svn propedit: $ svn propedit svn:externals . "svn-prop.tmp" 2L, 149C[1;1H ~...