Hot answers tagged

31

Use the snapshot: sudo add-apt-repository -y ppa:ubuntu-elisp sudo apt-get update sudo apt-get install emacs-snapshot


25

I have the following in my .emacs using Emacs for OSX: (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:stipple nil :background "white" :foreground "black"...


22

In addition to what abo-abo suggests, you can also build the sources by yourself: git clone git://git.savannah.gnu.org/emacs.git cd emacs sudo apt-get build-dep emacs24 # for rpm-based linux: sudo yum-builddep emacs ./configure # if there's no configure script: ./autogen.sh make # if that fails: make bootstrap ...


22

GNU Emacs has built-in support for fullscreen since version 24.4. From the changelog: New commands toggle-frame-fullscreen and toggle-frame-maximized, bound to <f11> and M-<f10>, respectively. Note that you don't need to use the latest Emacs version just for this feature. Your window manager (KDE/KWin) is able to put any application ...


19

You will be more comfortable in an X11 Emacs, which can receive keyboard input and display text without going through encoding and decoding for the terminal. The main reason to use a text mode editor is to run it inside screen or tmux on a remote machine, but thanks to Tramp, it's usually easier to edit the remote file in your local Emacs. That being said, ...


16

Dependent on your desktop environment the method to set a default application may differ. That said, many desktop environments respect the associations in ~/.local/share/applications/mimeapps.list, where you can set up an association for the application/x-directory and/or inode/directory types. My mimeapps.list looks like this now: [Default Applications] ...


15

Stable versions (25.1 currently): sudo apt-add-repository -y ppa:adrozdoff/emacs sudo apt update sudo apt install emacs25 Provided packages for LTS 14.04 and 16.04.


15

Reasons to use Lucid over GTK Stability Examples from etc/PROBLEMS: ** When Emacs is compiled with Gtk+, closing a display kills Emacs. ... *** Emacs built with GTK+ toolkit produces corrupted display on HiDPI screen *** Emacs built with GTK+ toolkit can unexpectedly widen frames Recent example: Bug#25228 "custom-set-faces from init file ~/.emacs ...


13

Well this turned out to be more of a rabbit hole than I though... And for what I can gather there's not a better solution for this specific issue, with this combination of desktop, ssh-agent, emacs. Problem 1 XFCE was starting it's own ssh-agent with the session, without actually saying so anywhere, which caused the system to have 1 unused global ssh-agent, ...


12

If you changed something in .Xresources file then you need to reread it to see any changes in current session. To keep your old resources settings and apply new one: xrdb -merge ~/.Xresources To throw away your old resources and apply only settings from .Xresources: xrdb ~/.Xresources Adjustments in .Xresources file are better, because they are applied ...


12

I use this in my init.el: ;; Set default font (set-face-attribute 'default nil :family "Source Code Pro" :height 110 :weight 'normal :width 'normal) You could try the same using Inconsolata instead of Source Code Pro.


6

Try adding (require 'iso-transl) to your .emacs file.


6

Although it is not clearly documented in its man page, emacsclient doesn't seem to accept a full command (i.e. program + arguments) as the alternate editor, only a program. You could write a small shell script: #!/bin/bash exec emacs -q -nw "$@" and use it as the alternate editor: export EDITOR='emacsclient -a PATH_TO_YOUR_SCRIPT'


6

In the release log of emacs:(http://www.gnu.org/software/emacs/news/NEWS.24.5) * Installation Changes in Emacs 24.3 ** The default X toolkit is now Gtk+ version 3. If you don't pass `--with-x-toolkit' to configure, or if you use `--with-x-toolkit=gtk' or `--with-x-toolkit=yes', configure will try to build with Gtk+ version 3, and if that fails, try Gtk+ ...


6

This is how to make emacs as default file manager in ubuntu. First we have to write a script which will act as our file manager. #!/usr/bin/env python import os import sys def main(): if len(sys.argv) > 1: dirname = sys.argv[1] else: dirname = '~' os.system('emacs --eval \'(dired "{}")\'%'.format(dirname)) # you can use ...


6

Another solution for the lazy is to just use a package that handles exactly this case (setting Emacs' keychain-related environment variables): Install and add to your init.el package keychain-environment. Run M-x keychain-refresh-environment and now it should work. Place (keychain-refresh-environment) in your init.el, so the solution works after restarting ...


6

Lucid Emacs uses the older lucid widget toolkit for XWindows. It looks older and greyer and I see no compelling reason to use it on a modern X desktop. Unless of course you have specific reasons to run it: run emacs in server mode on the background where the lucid version is reportedly more stable run on very stripped down X server configurations tldr; if ...


5

This always works whenever I want to try other fonts (put it in your init.el or .emacs file): (push '(font . "Inconsolata") default-frame-alist) or (add-to-list 'default-frame-alist '(font . "Inconsolata")) In this case both expressions are equivalent. In short, these forms set the font for the current and all future Emacs frames. Since these are saved ...


5

A pure Emacs solution that doesn't do exactly what you're asking, but close, would be to make e.g. Home be a key that adds the Ctrl, Shift and Alt modifiers to the next key that you press. That is, rather than press Home+key, you would press Homethen key. Emacs has a built-in feature to add a modifier to the next key, bound to the unwieldy C-x @ letter by ...


5

After extensive search and experimentation I found a way to succeed using the stress. Also it must be noted that is not the best way (technically it doesn't solve the problem but you get what you want). I used the following key bind command for every letter that uses a stress: (global-set-key (kbd "<dead-acute> α") "ά") (global-set-key (kbd "<...


5

When you run (server-start) it adds a function called server-kill-emacs-query-function (defined in server.el) to the kill-emacs-query-functions hook. One solution that might work for you (I've tested it and it works for me) is to modify your emacsclient line to emacsclient -c -a '' \ -e '(let (kill-emacs-query-functions confirm-kill-emacs kill-emacs-hook) (...


4

From: https://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html#Fonts Add a line to your init file: (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))


4

A possible solution is posted on ubuntuforums. I am posting the answer. The link suggests adding the following to ~/.Xdefaults emacs*font: 7x14 and running the command xrdb -merge ~/.Xdefaults


4

You can customize display-buffer-alist to achieve what you want, you can read more about the variable by doing C-hvdisplay-buffer-alistRET. Basically this variable allows you to register custom functions to display certain buffers. Below if a non-generic solution to your question. I have assumed certain things, you might want to adopt it your workflow, the ...


4

I had a similar idea once, but honestly? there are quite a few things that a proper build system needs, and which will require quite a lot of work. One thing you want is memorizing things you've built and building only the things you have to. This would typically call for interaction with database, version control system and writing code which builds a ...


4

try to add this code in init.el and restart the daemon: (require 'frame) (defun set-cursor-hook (frame) (modify-frame-parameters frame (list (cons 'cursor-color "DeepSkyBlue")))) (add-hook 'after-make-frame-functions 'set-cursor-hook)


4

Although the question is specifically for Linux I went and figured it out for Windows (since this prompted me to find how to do it for myself). Interestingly enough, you don't have to invoke Dired, simply pass a folder as the file. This saves a lot of hassle on Windows since %1 will pass c:\Users (for example) and break on \U if included in the eval ...


4

Thanks to the help by YoungFrog and wasamasa, I came up with this that solved my problem. (when (display-graphic-p) ;; Return non-nil if emacs is running in a graphic display. (load-file (concat (file-name-as-directory cust-emacs-dir) "loadpaths/fullscreen.el")) (require 'fullscreen) (fullscreen))


4

Well, Emacs is able to acknowledge changes outside, as long as the result is a file / directory with the same name. This includes temporary deletion and renaming. A renaming of a file or directory outside of Emacs is not visible to Emacs, because it has no information what the renamed file / directory shall be. Starting with Emacs 24.5, Emacs supports file ...


4

From the https://www.emacswiki.org/emacs/EndOfLineTips You can reopen the file with the correct line ending with a command like M-x revert-buffer-with-coding-system utf-8-dos. If your file is not in Unicode, be sure to specify the correct encoding system instead of utf-8-dos Dos uses CR+LF end of line, when UNIX uses only LF. CR sometimes looks like ^M. ...


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