Hot answers tagged

25 votes
Accepted

On Linux why should one choose Lucid over Gtk gui for emacs?

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 ...
user avatar
  • 8,803
9 votes

On Linux why should one choose Lucid over Gtk gui for emacs?

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 ...
user avatar
7 votes
Accepted

What is the difference between `-Q` and `-q --no-init-file --nosplash`

Q also uses --no-site-lisp. See the Emacs manual, node Initial Options. For information about X resources, see node Resources. Learn to ask Emacs: C-h r, then i and type some text to match an ...
user avatar
  • 70.3k
7 votes
Accepted

Copy and paste between Emacs in an X terminal and other X applications

You can use the external utilities xsel or xclip (they have mostly the same features, I'll use xsel in this answer) to copy data from or to the X clipboard. To copy to the clipboard, pass the desired ...
user avatar
7 votes

Is there an X11-free build of Emacs that can run on Wayland (not going through XWayland)

As of early 2021, the previously accepted answer is no longer the case. Emacs can now be ran in Wayland without XWayland. Core Emacs code has been (quite labouriously!) updated to use pure GTK, and ...
user avatar
6 votes

Make emacsclient create a frame only if there isn't one already

I ended up making this script based on this #!/bin/bash -e if [[ "$DISPLAY" ]]; then frame=`emacsclient -a '' -e "(member \"$DISPLAY\" (mapcar 'terminal-name (frames-on-display-list)))" 2>...
user avatar
  • 303
5 votes
Accepted

X11 -- Why is the Emacs logo image missing on the Welcome screen?

I tracked down the problem to the last line of use-fancy-splash-screens-p, which erroneously returns nil. If we change the last number from 19 to 17, the Emacs logo appears as expected. The revised ...
user avatar
  • 17.8k
5 votes
Accepted

Emacs cursor color is different in daemon and non-daemon modes

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-...
user avatar
  • 166
5 votes

How can I send Super from my Mac to my Emacs instance?

You can apply a super modifier with C-x @ s. So to type Super+z, you woule press C-x @ s z. If you find the C-x @ s combo too cumbersome, then you can bind it to something easier to type. Here is ...
user avatar
  • 7,843
5 votes

How can I send Super from my Mac to my Emacs instance?

You might want to have a look at the various ns-*-modifier, like ns-alternate-modifier (for Option) or ns-command-modifier (for Command). They allow to map the native OSX keys to arbitrary modifiers. ...
user avatar
  • 4,440
5 votes

What's the best API to use to interrogate the size of the underlying window system?

To expand on Tarsius' answer. display-pixel-width and display-pixel-height return the width and height respectively. display-monitor-attributes-list will give you information on all the available ...
user avatar
5 votes
Accepted

How can init file tell if running under X11?

To quote the documentation: window-system is a variable defined in `C source code'. Its value is x It is a terminal-local variable; global value is the same. Documentation: Name of window system ...
user avatar
  • 10.1k
4 votes

Prevent TTY fallback when X fails

Since Emacs 23, you no longer need to care whether Emacs was started from inside X. Start Emacs however you like, possibly as a daemon. Open and close frames on any display as desired. Start Emacs ...
user avatar
4 votes

What's the best API to use to interrogate the size of the underlying window system?

Use display-pixel-width and display-pixel-height.
user avatar
  • 24.4k
4 votes
Accepted

Why does Emacs swap Backspace and Delete on this one machine?

It turns out that Delete (delete) is also translated to DEL rather than deletechar; this happens in local-function-key-map, not in input-decode-map, so I didn't notice it at first because my ...
user avatar
4 votes

On Linux why should one choose Lucid over Gtk gui for emacs?

Daemon mode is THE preferred way of running emacs (numerous benefits), but the almost certain crash in the event of disconnect from the display is weighing in favour of the Lucid toolkit instead of ...
user avatar
4 votes

On Linux why should one choose Lucid over Gtk gui for emacs?

If you forward X11 you need Lucid emacs, because gtk emacs may crash if the ssh connection is lost and X server crashes. Note the error message when trying to run emacs --daemon with gtk emacs $ emacs ...
user avatar
  • 177
4 votes

Emacs 26.1 RC1 display issues over SSH/X11 with xming/vcxsrv

Emacs 26 by default switches on double buffering for X servers when it finds the Xdbe header on the build machine. (See Emacs 26 release notes at the GitHub mirror.) Some X servers don’t support this. ...
user avatar
  • 1,081
3 votes
Accepted

connect to remote emacs session via ssh

Since this is running on X, it might be possible to use a program like xdotool , xdo, or wmctrl All these programs allow you to list windows, select one, and simulate typing on them. Another ...
user avatar
  • 1,859
3 votes

emacsclient can't open display :0

Before running emacsclient you need to run xauth merge /var/run/gdm/auth-for-anthony-ATsjnA/database. This is due to gdm3's braindead use of XAUTHORITY. One way to work around that is to use ...
user avatar
  • 25.4k
3 votes

How can init file tell if running under X11?

You can use the function display-graphics-p: (display-graphic-p &optional DISPLAY) Return non-nil if DISPLAY is a graphic display. Graphical displays are those which are capable of ...
user avatar
  • 5,825
3 votes
Accepted

How to add killed region to X Window primary selection

I suggest you try out the xclip package, availble in GNU ELPA.
user avatar
  • 25.4k
3 votes

Hide mouse pointer while typing

You can use the mouse-avoidance-mode, see here for documentation. To test it simply enter M-x mouse-avoidance-mode and then select an option (see documentation link above) To have it permanently use ...
user avatar
  • 4,276
3 votes
Accepted

Is there an X11-free build of Emacs that can run on Wayland (not going through XWayland)

There is no graphical Emacs build for Linux without X, no. As suggested in the commentary, you can use textual Emacs instead and customize the parts interacting with the clipboard to use wl-clipboard ...
user avatar
  • 21.1k
2 votes

Copy and paste between Emacs in an X terminal and other X applications

Gilles's solution actually exists as a package, called xclip available from GNU ELPA. I.e. install it from M-x list-packages and then enable it with M-x xclip-mode RET. See also Clipboard manager ...
user avatar
  • 25.4k
2 votes

Emacs cursor color is different in daemon and non-daemon modes

The hypothesis The problem should come from Xressources. The Xressources are set via xrdb calls. The user-space place to store Xressources settings is ~/.Xressources (that usually are read and ...
user avatar
  • 21
2 votes

Emacs cursor color is different in daemon and non-daemon modes

In addition to zarkone's answer, there's a variable that controls whether Emacs should infer X resources: inhibit-x-resources. Setting it to t would disallow Emacs to use any X resources, relying on ...
user avatar
2 votes

Emacs slows to a crawl when Chrome is running

Try running "xcompmgr -n &". (See https://michaelheap.com/google-chrome-stealing-focus-repainting-in-xmonad/) This finally fixed emacs for me, but, ironically, it has slowed google-chrome down in ...
user avatar
  • 121
2 votes

emacs in --deamon mode dies when X display socket closes. How to prevent this?

The answer to the question is to use the Lucid version of emacs. With Ubuntu, the package is called emacs25-lucid. From comments in the code and it also pops out on stderr if you can managed to get ...
user avatar
  • 273
2 votes

How to make fonts show anti-aliased on Linux/X11?

Found a solution, neither of these fonts define themselves as mono-spaced, the solution is to force this. This can be done in fonts.conf or through the font specifier. Cascadia Code-13:spacing=90 (...
user avatar
  • 7,267

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