Dmitry
  • Member for 7 years, 4 months
  • Last seen this week
Debugging a frozen Emacs
57 votes

Before resorting to gdb, if you're using a Unix-y operating system, you can try sending SIGUSR2 to the Emacs process, like documented in the DEBUG file mentioned in the other answer. $ kill -SIGUSR2 &...

View answer
Find out backend used in company completion
25 votes

You can type M-x company-diag now, and see the used backend in the resulting buffer.

View answer
How to change Emacs windows from vertical split to horizontal split?
24 votes

Alternatively, there's a tranpose-frame package on EmacsWiki that will allow you to transpose the whole frame, as well as do other transformations (rotate by by 180 degrees; rotate by 90 degrees ...

View answer
Automatically re-indenting elisp code when adding or removing code before an indented block
Accepted answer
14 votes

Instead of mark-sexp + indent-region, you can press C-M-q. This will call indent-pp-sexp. Not automatic, but a bit better than having to invoke two commands. Or if you're using paredit-mode, press M-...

View answer
How do you run pry from emacs
Accepted answer
11 votes

rspec-mode has recently added a section in the README on this subject. It says: Install inf-ruby and add this to your init file: (add-hook 'after-init-hook 'inf-ruby-switch-setup) When you've hit ...

View answer
CSS code completion as in Firebug
Accepted answer
9 votes

company-mode provides slightly better results than auto-complete using the bundled company-css backend. You get completion of property names (up-to-date with the current state of CSS3, AFAIK), and ...

View answer
How can I visualize VCS status in dired?
Accepted answer
8 votes

You can install diff-hl from GNU ELPA and add the following to your init file: (add-hook 'dired-mode-hook 'diff-hl-dired-mode) But it doesn't color the lines. Instead, it shows statuses in the ...

View answer
What is the hook used by company-mode to perform autocompletion?
Accepted answer
8 votes

Unless you invoke one of the completion commands directly (such as M-x company-complete-common), the completion maybe-happens and the popup is rendered in company-post-command. It looks at the ...

View answer
Icomplete and Ido: Why are both in the codebase?
Accepted answer
6 votes

Ido is implemented in a way that would require a big rewrite for it to support completion in different context, not just the handful of the pre-defined ones. But it was born at the time when it was "...

View answer
How can I nest one syntax table in another?
6 votes

You don't want to nest one syntax table (which is a vector structure) inside another, you want to set up a buffer where, depending on the position, one syntax table would be used instead of the other. ...

View answer
Emacs robe mode for ruby, why does it need to start the server?
Accepted answer
5 votes

Short answer Because making use of a live process has been easier to implement than writing a static indexer. And because Ruby's metaprogramming abilities make almost any external indexer necessarily ...

View answer
How use rgrep for only org AND java files?
Accepted answer
4 votes

Instead of *.org, *.java, say *.org *.java at the second prompt (no comma). Note: to input in such completion prompt, type C-q SPC (that is, hold Ctrl and press q, then release Ctrl and hit Space).

View answer
binding <tab> to company complete
Accepted answer
3 votes

Try putting that binding into company-mode-map: (define-key company-mode-map (kbd "<tab>") 'company-complete) company-mode is not active in the minibuffer, so it shouldn't be affected....

View answer
What's the relationship between js-mode and js2-mode?
Accepted answer
3 votes

In addition to what @wasamasa said, js2-mode derives from js-mode and shares its indentation engine. Thus, fixing an indentation bug in js-mode fixes it in js2-mode as well.

View answer
Division sometimes breaks syntax highlighting in ruby-mode
Accepted answer
3 votes

In short, it is because Ruby's syntax is ambiguous, and because String#index accepts a regexp in its first argument. There are different tradeoffs different editors take regarding regular expressions ...

View answer
How can I make emacs support javascript ES6 template string literals?
3 votes

Or you just wait for Emacs 25.1 to come out. It's fixed there.

View answer
How to define a configurable variable in Elisp to be used in other program like Ruby?
Accepted answer
3 votes

The two main options are: Pass the value as an argument, or via standard input. Take a look at how erm-ruby-get-process passes through the value of enh-ruby-extra-keywords. Use an environment ...

View answer
Variables not shown in company-mode
Accepted answer
3 votes

Judging by the issue, the author of this question expected to see the documentation for variables from a package that hasn't been loaded yet. M-x describe-variable won't show it either, so it's not a ...

View answer
Reading mailing list archives in Emacs?
3 votes

And if you specifically want to read a thread for a certain Emacs bug, press M-x gnus-read-ephemeral-emacs-bug-group RET 12345, where 12345 is the bug number.

View answer
Company duplicates
2 votes

Depending on what causes the duplicates, you might be talking about https://github.com/company-mode/company-mode/issues/413, https://github.com/company-mode/company-mode/issues/285 (which are actual ...

View answer
How to make flycheck checker 'ruby-rubocop' use 'bundle exec rubocop' as executable?
2 votes

I'll let someone else clear that issue up for Flycheck. But for completeness' sake: if you install Emacs 27 (or newer) and enable flymake-mode in Ruby buffers, Rubocop integration is there, and it ...

View answer
Company mode won't autocomplete variables with underscores
Accepted answer
2 votes

In your setting of company-backends, don't use company-dabbrev in that group, use company-dabbrev-code.

View answer
project.el: override project root with dir-local var?
2 votes

No buffer-local vars available as an option, but you can add your own element to project-find-functions which would call project-current in some parent directory.

View answer
Indentation incorrect in line with `if:` or `unless:` as options, not directives
Accepted answer
2 votes

You're probably using the legacy indentation code, enabled with (setq ruby-use-smie nil). Set that variable to t (its default), restart Emacs, and the problem will disappear.

View answer
Emacs doesn't recognize if file is under version control
2 votes

The VC packages uses caching, and in many places assumes that the user interacts with VCS systems (e.g. Git) through it. To register a new file in a Git repository, press C-x v v, you don't need to ...

View answer
Feasible tags solution for a large Ruby codebase?
Accepted answer
2 votes

The etags program that comes with Emacs is a solid option. In 25.1, Eli added Ruby support, as well as fixed some parsing problems that are still present in the commonly used version of ctags. "Why ...

View answer
vc-git doesn't recognize that file is under version control
Accepted answer
2 votes

Emacs caches version control information for each buffer. If you visit a file first, and then git add it in a terminal, Emacs doesn't know this. You can M-x revert-buffer to force it to refresh the ...

View answer
js2 mode doesn't recognize variable in "for in" statement
Accepted answer
2 votes

It warns you that the key variable is undeclared, and using it like this, you leak it into the global namespace. Try this is your browser console: > let foo = {bar: 1}; > for(key in foo) {} &...

View answer
Leuven Theme makes org-mode headline too big
Accepted answer
2 votes

Fabrice added a variable for this not too long ago: leuven-scale-outline-headlines. Most importantly, you'll have to set it to nil before the theme is loaded. One way to do that is to it through M-x ...

View answer
How can I use company's ignore-case with pip-requirements.el
Accepted answer
2 votes

Using completion-ignore-case is the way to go. The input match highlighting should be fixed in 9b895568.

View answer