Tag Info

New answers tagged

1

Emacs was not using colors because the TERM environment variable was set to vt100. Changing it to xterm solved the problem.


1

(setq auto-capitalize-predicate (lambda () (not (looking-back "\\([Ee]\\.g\\|[Ii]\\.e\\|\\.\\.\\)\\.[^.]*" (- (point) 20)))))


1

It's possible to create a simple shell function which works as it is reading from stdin (although in fact it is writing to a temporary file then reading that). Here's the code I'm using: # An emacs 'alias' with the ability to read from stdin function e { # If the argument is - then write stdin to a tempfile and open the # tempfile. if [[ $# -ge ...


2

You can use the function key-description to convert the sequence into a more readable form - (key-description [24 4]) => "C-x C-d" and then convert it back using the function kbd, so you can say (global-set-key (kbd "C-x C-d") 'some-command) So using kbd you can skip the trick mentioned and just write your keybindings directly. It's a little more ...


1

In Emacs lisp, characters are written ?<char>, and just like in C they are treated like integers, so instead of 24 you can write ?\C-x or ?\^x and instead of you can write ?\C-d or ?\^d, so over all, I'd write it [?\C-x ?\C-d].


1

You can export to org-mode, and this will generate an org-mode file with expanded macros, included files, removed comments, and all other pre-processing. Export to org-mode buffer is bound to C-c C-e O O.


1

use the command xmlint to open the file and then using any of the program editors like notepad++,Sublime Text, atom,etc add the letter which you removed using regular expression function available in all the editors. You should be able to get the good copy of file now.


0

See accepted answer from: Emacs font settings not working in new frame ie: (add-to-list 'default-frame-alist '(font . "Source Code Pro-15:style=Light")) retains the specified font across new frames, confirmed under Emacs 24.4


1

Various parts of Emacs work "a line at a time", under the assumption that lines are not too long. So long lines like the ones you describe tend to bring Emacs to its knees. There ae often ways to reduce the pain, but it all depends on the specifics of your case, so without more details as to which major mode you're using (for example), the most obvious ...


3

Following would work with vim. Perhaps easier to wrap into a function. :%s/$/$ :g/= {/.,/};/join! :sort :%s/\$/\r/g In a nutshell 1. Replace the EOL with a special character (I've chosen $) 2. Search for "= {" and join all lines up until first "};" 3. Sort 4. Replace the special EOL character back to a real EOL character.


0

For Emacs, use function sort-regexp-fields - see the Elisp manual, node Sorting. You can also use function sort-subr, which is even more general, or function sort-paragraphs or sort-pages. For the latter two, the sections to be sorted would need to be separated by one or more blank lines (for paragraphs) or form-feed (^L) characters, and there would need ...


1

Edit: The below won't actually do what the OP requires as the values don't change when the keyboard is switched via the Language Bar shortcut, even though they do if you do it via the Control Panel. Leaving for completeness. I cannot find any documented systeminfo or Powershell commands that may retrieve this information. I thought something like this may ...


2

Setting the :prepend property should add your new sub-heading as the first child rather than the last. Doc here.


0

It seems that this is a partially known issue with el-get, and it's easier to switch to another package manager (MELPA in my case). Thanks to @npostavs for linking me to some further discussion.


0

Try setting the variable gnus-use-full-window to nil. That should give you the desired behaviour at least most of the time.


1

There's savehist-mode specifically for that kind of saving/restoring: (savehist-mode 1) (add-to-list 'savehist-additional-variables 'query-replace-defaults)


0

bug #18751 has been fixed by the Emacs development team. The fix is now included in the current version of Emacs Trunk. Tested with Emacs Trunk built --with-ns on November 5, 2014: GNU Emacs 25.0.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2014-11-05 on MP.local


1

One library that provides such behavior is Narrow Indirect (narrow-indirect.el). It gives you a different view of a portion of the buffer, or even of the whole buffer (use C-x h C-x 4 n n). It always has the same text and text properties, but otherwise it is pretty independent. In particular, you can kill an indirect buffer without affecting its base ...


1

This is off-topic to scrolling with my trackpad, but who knows: (global-set-key (kbd "<mouse-7>") '(lambda () (interactive) (scroll-left 4))) (global-set-key (kbd "<mouse-6>") '(lambda () (interactive) ...


1

When an error message appears in Emacs stating that symbol's function definition is void ..., the usual cases are as follows: The library containing the function named in the error message is missing. The library containing the function named in the error message is not in the load-path. The library containing the function named in the error message has ...


0

Copy text from vim under cygwin, just press "key +key ykey in visual mode : "+y Paste text to vim under cygwin, just press " key +key pkey in normal mode : "+p



Top 50 recent answers are included