Most Popular

1500 questions
10
votes
4 answers

How to make shell-command run using shell profile and current directory hooks (ex. direnv)

I am trying to get shell-command and async-shell-command to integrate seamlessly with a couple of programs in my .bashrc file, specifically direnv in this example. I found that if I customized shell-command-switch, I could get shell processes to…
waymondo
  • 1,384
  • 11
  • 16
10
votes
2 answers

How can I prevent flycheck-mode from checking certain files?

I've configured Emacs to open files named *.cfg in shell-script-mode. These are config files, of course, rather than shell scripts, but 90% of the time it does what I want (mainly, good guesses about faces for comments and variable assignment). I…
10
votes
2 answers

How to get org-agenda to prefer split-window-right

After upgrading to Emacs 24.4.1, when I call org-agenda with no splits it will show on the bottom half of the frame. Previously, it would show on the right half. How do I configure this behaviour?
Nathaniel Flath
  • 627
  • 6
  • 13
10
votes
2 answers

org-babel result to a separate buffer

I use org-babel to generate some reports which can't be automatically processed, and since org is a good outline format, I print the results in org to represent them as trees. I've noticed that nesting org markup into #+begin_example block makes…
Roman Grazhdan
  • 358
  • 3
  • 9
10
votes
5 answers

Browser not opening when exporting HTML from org-mode

Org-mode can export as HTML and open on a browser with C-c C-e h o (org-export-dispatch), but the problem is that the generated html file opens in a buffer inside emacs. There is no error in the message buffer, either. How can I make it work? When I…
El Diego Efe
  • 1,601
  • 1
  • 19
  • 24
10
votes
2 answers

Run ssh-add from Emacs and enter a passphrase

I want to call the ssh-add shell command. So I invoke M-x shell-command RET, and in the minibuffer, I type: ssh-add .ssh/id_rsa The only thing I get is: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory^M How can I make Emacs give…
Nsukami _
  • 6,341
  • 2
  • 22
  • 35
10
votes
3 answers

Can I change the background color of the inactive minibuffer?

I tried it with the following settings: (add-hook 'minibuffer-setup-hook (lambda () (make-local-variable 'face-remapping-alist) (add-to-list 'face-remapping-alist '(default (:background "green"))))) (set-face-background…
Lenar Hoyt
  • 1,163
  • 7
  • 25
10
votes
1 answer

Speed up TeX-insert-macro on \input

In latex-mode when I use TeX-insert-macro to type a \input{...} macro, Auctex conveniently offers filename completion, which is great. However, it seems to search a lot of places to compile the completion list, because emacs hangs for almost a…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
10
votes
6 answers

How do I get my initial frame to be the desired size?

I have the following in my .emacs file: (when window-system (set-frame-position (selected-frame) 0 0) (set-frame-size (selected-frame) 91 63)) The value of 63 is supposed to make my initial frame take up the full vertical height of…
b4hand
  • 1,995
  • 1
  • 19
  • 31
10
votes
2 answers

cl-destructuring-bind on partial plist?

This causes an error (cl-destructuring-bind (&key a b) '(:a "foo" :b 13 :c "bar") (list a b)) because the :c key/value is not handled in the pattern match. Often I find myself wanting to extract some subset of keys/values from a…
fommil
  • 1,750
  • 11
  • 24
10
votes
2 answers

Shift+arrow to change window does not work in org-mode

I installed a package that changes emacs windows using Shift+arrow, and it works in various modes I use but not in org-mode. Is there a reason why org-mode shadows this command?
10
votes
1 answer

How can I save UTF-8 files with a Byte Order Mark?

I am trying to configure Emacs to save UTF-8 files with a Byte Order Mark. (Yes, I know that the BOM is evil and unnecessary for UTF-8 files. However, Microsoft has decided they know better, so I want to make sure I'm able to save files with…
Scott Weldon
  • 2,695
  • 1
  • 17
  • 31
10
votes
2 answers

Automatically switch focus to new window

Is there a way to automatically switch focus to any new windows? For example, if I C-h f some-function, that creates a new window. But the focus remains where I was, so when I'm done reading and hit q, I just type a q in whatever buffer I was in…
Alex
  • 1,028
  • 5
  • 20
10
votes
3 answers

Highlighting upcoming dates in org mode agenda

I have entries in my org file similar to: * Birthdays :PROPERTIES: :CATEGORY: birthday :END: %%(org-anniversary 1981 1 2) Harry (%d) What I would like is for these to appear in the agenda (say) 2 weeks before they're due, similar to how a deadline…
Dave F
  • 553
  • 2
  • 13
10
votes
2 answers

In Org-Mode, is there a way to narrow the buffer to just the text under a heading?

For example, say I have a buffer that looks like this: * Org-Mode This is a document written in Org-Mode ** This is a subheading below that Would it be possible to narrow the buffer to just "This is a document written in Org-Mode" and continue on…
Bob
  • 173
  • 1
  • 7