emacs

What does the double minus (--) convention in function names mean in Emacs Lisp

I've been reading through a number of Emacs Lisp packages and have come across the convention of some functions being declared with -- after the library prefix, e.g.: (defun eproject--combine-regexps (regexp-list) I'm wondering if this a convention for declaring "private" functions to the library but so far I haven't found anything in...

Doing a make over TRAMP

I am using Emacs Tramp for remote development. I think something must be wrong. I had some serious issues with speed when I used ssh:, so I switched to scp:. It seems to work much faster. I tried to run M-x compile with make and it seems to act differently than if I run make directly from a shell prompt. Namely, it is unable to find...

Customizing emacs to dim or de-highlight one-liners in code

I program extensively in Python, and instead of using fancy debuggers I just use lots of print statements to figure out what my program is doing. I've set it up so that a typical function looks like this: def do_something(*args, **kwargs): verbose = True verbose and print("Entered do_something with args: {0} and kwargs: {1}".for...

How do I adjust cperl mode indentation of qw//?

Following on from this question, here's another bugbear. I am getting my @browsers = qw/ Firefox MSIE /; but I want my @browsers = qw/ Firefox MSIE /; What setting in cperl mode in Emacs might I use to achieve that? ...

How can I make emacs think it is using a terminal?

I want to automate a job involving font lock mode using Emacs. I want to fontify a file and then convert it to HTML using the colouring of font lock mode. The problem is that Emacs refuses to fontify the file unless it thinks it is running in a terminal. In other words it will not fontify when running under -batch. Is there a way to fool...

failing while sending bug email in emacs

C-cC-c,get this info: Sending...terminated by signal: Broken pipe I find paste a long file in text mode is wrong(GUI version is OK), and want to send a bug email. what should i config? sending mail in emacs is cool! thanks! ...

Emacs keyboard mappings on a macbook

I recently switched to a macbook. I miss the right control key and my little finger started to ache and thus I mapped my Cmd to Ctrl inside emacs alone and I've mapped Caps to Ctrl and Ctrl to Caps system-wide. Does anyone have a better config before I get used to this ? What is yours? I'm particularly interested in the keyboard mapping...

Make nXML open the same schema file every time?

I only use nXML for authoring docbook documents, and I would like to tell nxml to always load C:\docbook-5.0\rng\docbookxi.rnc How do I do this? ...

How do you copy just the visible text from the folded state in an org-mode buffer?

How to copy org file to other buffer, if source is: ** TODO task #1 - some text for task #1 ** TODO task #2 - some text for task #2 but when you collapse all tasks it will look like ** TODO task #1 ... ** TODO task #2 ... I want to mark all tasks and copy to another buffer and it must look like a second variant. Don't inclu...

compile command across emacs sessions

Hello, how do i maintain a compile command across emacs sessions for a given file? so, suppose I have file1.x, and I would like to use tool XComp to compile it. To do this, I need to run the following hypothetical command: Xcomp file1.x && extract file1.x && Xlink file1.obj So I do M-x compile, and write that thing. Now I have it ava...

Emacs: Define macro in comment and automatically execute it.

Hello, I'm using Emacs/AucTeX for editing LaTeX files. In some of my LaTeX files, I have defined some "file-specific" command (e.g. \todo{...} in one file, \compute{...} in another, and so on), so I can keep track of what open problems I have in my documents. The Emacs command highlight-regexp does quite a good joob in highlightning al...

Automatically replace certain text string as they are typed in emacs

There's a small nuance that's been bugging me for a while, namely that I frequently type #inclued instead of #include. If it wasn't obvious, I program a lot of C and C++. That typo has wrecked countless builds and consumed time that would have been better spent drinking coffee or surfing stackoverflow. Surely emacs can be helpful and rec...

Why is GDB so slow when I type I try to print an invalid symbol?

When I execute in GDB: p some_nonexistant_variable_name GDB takes minutes (sometimes) to report that it can't find the the variable in scope. Additionally when I type: p some_variable_that_is_in_scope->toString() it takes forever...sometimes. Not sure why. I'm using UBuntu 10.04, running GDB through Emacs 23. Any ideas? ...

Do I need to know Emacs Lisp in order to use GNU/Emacs

Hello, Recently, I began studying GNU/Emacs. Was very easy to use program. Studied its structure. Tuned nice color for me. Configure it to class on C programming. Everything seemed normal. But now the question arose of GNU/Emacs lisp. Should I really spend time to study Emacs Lisp if I did not develop itself Emacs and will only use it l...

How do i get emacs syntax highlighting to recognize double quoted strings?

Emacs in html and php modes don't seem to recognize double quoted strings, or at least don't color them correctly. How can i get them to be visible? ...

How to force Emacs to save even if it thinks (no changes need to be saved)

This happens to me all the time: I have a file open in emacs, I save it ('save-buffer), the file changes on disk (or get's deleted, moved, etc.) but I want it back, so I try to save again in emacs ('save-buffer) and instead of saving it says "(no changes need to be saved)" and does nothing. Is there a different function, or a setting...

Integrate Emacs copy/paste with System copy/paste

I have (cua-mode t) in my .emacs, so that C-c is copy and C-v is paste just like most other programs on my desktop (Ubuntu, Gnome, Linux). However, Emacs does not seem to share the clipboard/copy buffer with other programs. For example, if I C-c in Firefox I can S-C-v to paste into a terminal or C-v to paste into gedit. However, if I C-...

In Emacs, how can I have the same buffer open in multple frames (when using ido/iswitch)?

In emacs, I'd like to open the same buffer in multiple frames. Before I used ido, this was easy: I'd just switch to the buffer in one frame with C-x b, then focus a different frame in my window manager, and then open the buffer in that other frame too (with C-x b again.) But, now that I use ido for fuzzy completion in C-x b, when I try t...

Interactive compilation mode in emacs ? (what if compiler asks a question)

Hi, I am looking for either a hack to regular compilation mode, or suggestion on how to create new mode. What i want to achieve, is to 'compile' my code - but the compilator sometimes asks certain questions on the terminal (yes/no, etc etc). Afaik, regular compilation mode can't direct my keyboard input and feed the subprocess with it. ...

how to do file selection using mouse with emacs cedet?

I am using emacs 23.2 on Ubuntu 10.04 & Windows XP along with cedet extention. Cedet seems to work fine but I could not select the file using mouse. Rather I need to use the Key press to select the file from cedet (placed at left side).. how to do file selection using mouse with emacs cedet? Any clue shall be appreciated... ...