Skip to main content
6 votes
Accepted

Is there a way to suppress warnings when a package is compiled in elisp?

See byte-compile-warnings: List of warnings that the byte-compiler should issue (t for almost all). Elements of the list may be: docstrings: docstrings that are too wide (longer than byte-compile-...
shynur's user avatar
  • 5,473
5 votes
Accepted

Create custom "mode-hook" for other programming languages

As far as I know, there's no r-mode in Emacs. Instead, you're probably using ESS's support for R, whose major mode is called ess-r-mode IIRC, so you'd want to use ess-r-mode-hook. But as @phils said:...
Stefan's user avatar
  • 26.5k
4 votes
Accepted

What controls whether `M-x compile` splits a frame into two windows?

compile displays the output buffer using display-buffer (as do most other commands, fwiw). You can see this in compile.el, which is included with Emacs. There is always a link from the help for a ...
db48x's user avatar
  • 18.4k
3 votes

Function `cd` not working correctly in conjunction with `tramp` and `compile`

Your command cd /ssh:desktop:/home/user/project/Release && make will be given to a shell on the remote machine. This doesn't know any Tramp syntax, and it runs already on the proper host. So ...
Michael Albinus's user avatar
2 votes

How to Run a Context Sensitive Compile?

did you try with .dir-locals.el file? something along the lines ((c++-mode . ((compile-command . "make -j 4") ;; other customisation )) ;; other modes )...
user5972998's user avatar
2 votes

How to add -shell-escape option to latex compile command

For the built-in TeX mode (i.e. not AucTeX), you can customize the variable tex-start-options: do C-h v tex-start-options and hit the Customize link. Enter --shell-escape as the value string, hit ...
NickD's user avatar
  • 30.9k
2 votes

"Auto-Confirmation: Automatically Saying Yes" but how?

Try customizing (or binding) compilation-ask-about-save to nil. C-h v tells you: compilation-ask-about-save is a variable defined in compile.el. Its value is t Documentation: Non-nil means M-x ...
Drew's user avatar
  • 78k
2 votes
Accepted

Can't make emacs compile with locally installed harfbuzz

Emacs' configure uses pkg-config to search for HarfBuzz, so you need to ensure that your PKG_CONFIG_PATH points at the pkconfig directory for your new installation of HarfBuzz (this is true for a lot ...
rpluim's user avatar
  • 5,345
2 votes
Accepted

How to compile makefile files for newbies

This isn’t really an Emacs question. Emacs is a text editor, and makefile-mode is for editing Makefiles. A Makefile contains instructions for building software, and often for other tasks such as ...
db48x's user avatar
  • 18.4k
2 votes

Can't overwrite compile-command

When you call (add-hook …  0 t) the t means to add the hook locally to the current buffer. When you load a C file, it creates a new buffer, and that hook isn't active in the new buffer. I believe you ...
amitp's user avatar
  • 2,541
2 votes
Accepted

git question: Why does git fetch not provide a fully updated local repo of Emacs?

This is purely a question about Git; it has nothing to do with Emacs for all that it involves the Emacs repository. The short answer is that “git fetch” downloads new commits from whatever remotes you ...
db48x's user avatar
  • 18.4k
1 vote
Accepted

Configure compile command to take buffer-file-name as its source file argument

Directory variables may be used to solve the problem. Contents of .dir-locals.el in the root of the project directory: ((c-mode . ((eval . (setq-local compile-command ...
David Smith's user avatar
1 vote
Accepted

Automatically kill an in-progress compilation when compile is (re)invoked?

(setq compilation-always-kill t)
user41646's user avatar
1 vote

Function that determines and returns the programming language of a given file

Emacs doesn't determine a file's programming language. What it does is look at the file buffer's major mode, and that mode is often (by default) associated with a given programming language. See (C-h ...
Drew's user avatar
  • 78k
1 vote
Accepted

Create shortcut for interactive compile command

(global-set-key [f5] (lambda () (interactive) (let ((current-prefix-arg '(4))) (call-interactively 'compile))))
lawlist's user avatar
  • 19.2k
1 vote

Cannot make `compile-command` buffer local

(set (make-local-variable 'compile-command) compile-command)) The latter compile-command is evaluated after (make-local-variable 'compile-command) so this should be a no-op -- you're making the ...
phils's user avatar
  • 51.7k
1 vote

M-x compile hangs with WARNING: terminal is not fully functional

The problem arises because the M-x compile command uses the dumb terminal type and invokes .cshrc before running the command make -k. My .cshrc loads modules with the module command. The module ...
Gopal Patnaik's user avatar
1 vote

How to Run a Context Sensitive Compile?

This is a solution which searches up the parent directories for common build system filenames, and runs the appropriate build-command. Posting here since it works, although better methods may exist. ...
ideasman42's user avatar
  • 8,846
1 vote
Accepted

Projectile command for debug and release

You could use projectile-test-project (bound to C-p p P) as your debug command and projectile-compile-project (bound to C-p p c) as your release command. projectile-toggle-between-implementation-and-...
Swedgin's user avatar
  • 219

Only top scored, non community-wiki answers of a minimum length are eligible