In elisp I have a time in the (form of three integers), and I can get the month using decode-time. What I'd like to get is the number of days in that month (and year), using elisp functions (rather than write my own).
i.e:
(defun days-in-month-at-time(t)
; Figure out month and year with decode-time
; return number of days in th...
One problem that I have with emacs is that it doesn't seem to handle like-named files in different directories very well. For example, if I'm not careful, I'll end up with 20 __init__.py buffers open. What I've been doing is using M-x rename-buffer and renaming it to indicate what package it's within. However, doing this manually is s...
I am looking for any way to have Emacs format a Python buffer by hitting a few keys. By format, I mean:
Replace tabs with 4 spaces
Wrap all long lines correctly at 79 chars. This includes wrapping & concatenating long strings, wrapping long comments, wrapping lists, function headers, etc.
Unrelated, but when I hit enter, it'd be nice...
Hi,
I have a little problem with compiling my project in emacs. The compilation buffer does not line-wrap and I have some very long compile and link commands which I would like to sanity check sometimes.
Does anyone know how to force line-wrap on the output added to the compilation buffer, ideally as it is added (a la auto-fill).
V...
What is a more sane, automatic solution to tabbing my code by 4 spaces for a bunch of files? How do I make sure that tabify does not affect perldoc?
...
I have a Emacs extension that creates a buffer named *erl-output*. This buffer gets created with only fundamental-mode by default. Is there any way to automatically enable compilation-minor-mode on that buffer?
...
Emacs 23 is running on a remote Linux box. It displays its frame on this local Windows box, using Cygwin's X server. I used to be able to copy-paste any text from Emacs to any Windows application. Since after I upgraded from release 22 to 23, combining diacritics don't come through any more.
Non-combined characters pass unharmed. Fo...
I reallly should know how to do this by now, but --
in emacs how do you do a query-replace-regexp that will match across multiple lines?
as a trivial example I'd want <p>\(.*?\)</p> to match
<p>foo
bar
</p>
...
I'm wondering what's people using to correctly capitalize english strings since ''capitalize'' won't do the job:
(capitalize "can't")
=> "Can'T"
Although writing this function is trivial, I'm wondering if there's a preferred built-in way to do it.
...
Is it possible to configure anything.el that that it open files from a certain predefind directory. At the moment it just works for the current directory.
How would that work?
...
I've been randomly getting the following error in emacs:
Variable binding depth exceeds max-specpdl-size
...and I've been getting it at very random moments. After researching this, it seems as though some elisp somewhere is recursing too deeply. Are there any strategies for tracking this down? I'm totally at a loss as far as wha...
Emacs reindents the current line whenever I type certain things, like ";" or "//". This is pretty annoying, since there are a whole lot of places where it isn't smart enough to indent correctly.
How do I disable this feature? I still want to be able to indent the line with TAB, but I don't want any source code I type to cause it to re...
I have several thousand lines of delimited data. Unfortunately some of my data wrapped to a new line. How can I search for all lines that do not contain my delimeter then join with the prior line, skip to the next line then continue until the end of the buffer?
Buffer before
1243|This is all one
line
1235|This fits on one line.
43223...
Hello,
I want to search in all files from current folder for macro CODE_INIT_PARAMETERS.
I can do
M-x occur CODE_INIT_PARAMETERS
but this shows only entries from open buffers.
Is there any way to search all files from current folder, from Emacs, without switching to M-x shell and then grep ? I want to avoid grep, because for some ...
Hello everyone. I'm currently creating a Rest client for making blog posts much in the spirit of pastie.el. The main objective is for me to write a textile in emacs and make a post to a Rails application that will create it. It is working fine until I type anything in either spanish or japanese, then I get a 500 error. pastie.el has this...
How can you enable syntax for MicroEmacs?
I put the following unsuccessfully to my the file uelocal_rc in my HOME.
add-global-mode "HILITE"
I also put unsuccessfully the following command both to .emacs and to uelocal_rc at my HOME.
(require 'font-lock) ; enable syntax highlighting
This suggests me that .emacs does not manipula...
I have created a regular expression with re-builder in Emacs. I use C-c C-w to copy it to the kill-ring.
The kill-ring shows:
"\\(defun\\)"
First, I modified the copy function to get rid of the "".
\\(defun\\)
My other problem is, the regex in the kill-ring contains double backslashes, rendering it unusable for functions like query...
My work computer (Ubuntu 8.10) has CEDET version 1.0pre4 installed, and I'm trying to install the newest version of CEDET (1.0pre6) in my local directory (the ultimate goal, upgrading ECB to the newest version).
Unfortunately, the default debian/ubuntu installation initializes the system-wide packages for CEDET and ECB before my .emacs ...
I am looking to include a reference to a non-elisp file (a small Python program), and would like to be able to say "it is in the same directory as the current file, but with a different file name." In many scripting languages, there are things like __FILE__ (in PHP) for getting an absolute path to the current file.
If the file to be inc...
Hi emacs users, I wonder if anyone out there uses ssh through the emacs shell. I am able to connect with the remote machine but I cannot open files to view/edit with emacs using 'emacs filename' as the 'Terminal type "dumb" is not powerful enough to run emacs' (normally emacs would open within the console when connecting through the term...