emacs

Emacs without Lisp

Should I learn to use Emacs with no intention to learn Lisp, if my other option is to get familiar with vi? ...

In emacs under cygwin keyboard mappings don't work.

When I run Gnu Emacs under cygwin on Windows and I press "ctrl-x ctrl-c" to exit I get the message: ctrl-x ctrl-g is undefined : However, when I run Xemacs the "ctrl-x ctrl-c" works fine ...

problem in `delete-directory` with enabled `delete-by-removing-to-trash`

There is a strange behavior of delete-directory function with enabled flag delete-by-removing-to-trash. It deletes files one by one instead of applying move-file-to-trash to the directory. As a result emacs deletes big directories slowly and there are many files in the trash after deleting, so it is impossible to restore the directory. ...

Emacs bulk indent for Python

Working with Python in Emacs if I want to add a try/except to a block of code, I often find that I am having to indent the whole block, line by line. In Emacs, how do you indent the whole block at once. I am not an experienced Emacs user, but just find it is the best tool for working through ssh. I am using Emacs on the command line(U...

Using MailDir as a Backend for Gnus

I am using offlineimap to sync my gmail account to a locak maildir, then using gnus to read that directory everything is fine but gnus uses its own flags for marking read unread status of messages and they are not synced back to gmail. is there a way to force gnus to use standart maildir flags? ...

org-mode dates in other emacs modes

Hello, I would like to insert dates in an emacs buffer like I do in org-mode (C-c .), while in a mode other than org. Is there a minor mode for this? Calendar does not do what I need, since I can "+1" a day, for instance. Thanks. ...

How can I swap or replace multiple strings in code at the same time?

Given the following code sample: uint8_t i, in, ni; i = in = 2; ni = 1; while (2 == i > ni) in++; How can I replace i, in, and ni, respectively with either in, ni, and i or inni, inin, and nini using emacs, vi, *nix commands, or anything else? ...

How do I create an empty file in emacs?

How can I create an empty file from emacs, ideally from within a dired buffer? For example, I've just opened a Python module in dired mode, created a new directory, opened that in dired, and now need to add an empty __init__.py file in the directory. If I use C-x C-f __init__.py RET C-x C-s then emacs doesn't create the file because no...

Can I use swank-clojure with the clojure 1.2 master branch?

I'm happily using swank-clojure, installed via elpa. But I'd like to do some work with deftype, defprotocol, etc., which aren't aren't available in clojure 1.1. To use my own class paths, I'm using the excellent suggestion by Rick Moynihan in the stackoverflow question about setting custom classpaths, which was to set up a script like:...

How to Reload files upon save when using swank+leiningen+emacs

I'm looking to set up slime+lein-swank to reload source files referenced from the repl when i save the file. currently i do this: edit file save file switch to repl (use :reload-all 'com.package.namespace) test stuff I want to not have to remember to do step 4. ...

Splits and windows in vim/emacs/etc.: can we have buffer-specific splits?

I'm using Charles Campbell's MPage[0] plugin to get multiple pages open, so I have vertical splits open for one buffer. My question is: can I have another display without splits open for another buffer, and switch back to the display with splits, without opening another instance of vim? It's easy to do so using tmux or the like, bu...

How do you debug c/c++ source code in linux using emacs?

Hello all, I am using emacs and autotools, to write and compile c/c++ sources on linux. I am using gdb via GUD in emacs. I have defined for convenience: F7:compile, F10:gud-next, F11:gud-step, F5:gud-cont, F9:gud-tbreak, F8:gud-until, F4:gud-print. I am mainly interested in debugging c/c++ source code on linux from emacs and I would lik...

Emacs, Cedet and semantic

Hello everyone, I've configured CEDET for emacs following Alex article (great!!). Now, the questions: 1 - i've generated GTAGS with Gnu Global in my /usr/include, how can i check if semantic is using GTAGS? 2 - can I keep my GTAGS in another directory and instruct semantic to use that dir?? 3 - In c/c++ sources, completion on inclu...

Do overlays/tooltips work correctly in Emacs for Windows?

I'm using Flymake on C# code, emacs v22.2.1 on Windows. The Flymake stuff has been working well for me. For those who don't know, you can read an overview of flymake, but the quick story is that flymake repeatedly builds the source file you are currently working on in the background, for the purpose of doing syntax checking. It then h...

an emacs command to open a new instance of emacs

How can I make a cross-platform emacs command that opens another instance of emacs with -q option? The reason why I need such a command is that it would be easy to modify the command to make it open another instance of emacs with -q and -l option so that the new instance loads an el file that I am editing with the old instance. ...

Gnu Emacs indenting of my typedef

Gnu Emacs is insisting on indenting my typedef as follows: typedef enum { horizontal, vertical, } shapes; I want it to indent as follows: typedef enum { horizontal, vertical, } shapes; What switch can I use to get that? ...

How to set a keybinding which is valid in all modes in Emacs

Hi, I've configured my emacs to use M-j as backward-char by (global-set-key (kbd "M-j") 'backward-char) ; was indent-new-comment-line in my .emacs file. This works fine in many modes (text/org/lisp). But in c++-mode & php-mode it is bound to the default c-indent-new-comment-line How can I bind M-j to use backward-char in these mode...

(re)number numbered lists in emacs (muse)

hello, suppose I have a text list in emacs like this: a b c ... d Is there a way to assign numbers to those items in Emacs, by selecting the region? End results should look like: 1. a 2. b 3. c j. ... n. d Thanks. ...

Emacs on Windows: how to protect built-in el files from being accidentally edited

On Linux, they are all read only, so no problem. But on MS Windows, what happens is like this: I get curious about the definition of the command isearch-forward, I type C-h f isearch-forward and click on the link isearch.el from the help to get to the definition of the function, and while I am reading its definition, I press C-h or C-c ...

How prevalent is the use of Emacs' eshell in multi-platform development?

I've only recently become aware of Emacs' eshell tool. It looks quite powerful in that it is entirely written in Emacs Lisp and does not require native subshell support. The Emacs info documentation is a bit sparse but EmacsWiki has pretty decent information, at least on a first glance. Given the potential value of eshell as a scripti...