23

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 ...


10

PATH vs exec-path The PATH environment variable lists directories for programs to find executable files (when executing a non-absolute filename). The exec-path Emacs variable lists directories for Emacs to find executable files (again, when executing a non-absolute filename). The value of exec-path takes its value from the environment variable PATH when ...


9

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 ...


8

Maybe some clue in 'image.el'.. C-h v image-type-available-p image-type-available-p is an autoloaded compiled Lisp function in `image.el'. (image-type-available-p TYPE) Return non-nil if image type TYPE is available. Image types are symbols like `xbm' or `jpeg'.


8

I think the cause of the problem is visible-bell. Just put the following to your .emacs file: (setq ring-bell-function 'ignore) to get rid of both audible and visible bell


5

You can use window-absolute-pixel-position: window-absolute-pixel-position is a compiled Lisp function in `window.el'. (window-absolute-pixel-position &optional POSITION WINDOW) Return display coordinates of POSITION in WINDOW. If the buffer position POSITION is visible in window WINDOW, return the display coordinates of the upper/left ...


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) (...


5

I have created an image corresponding to the pepper.xpm in the below example. In emacs25.3 use 22x22 pixel image. I just copied one of the xpm image files in the /usr/share/emacs/25.3/etc/images (in Linux) folder, and resaved it in a different name (pepper.xpm) in the same folder. Add to your init.el | emacs.el: (add-hook 'after-init-hook (lambda ...


5

Found solution on this github: The window frame cannot be maximized 100% to suit the whole screen Seems like the problem was the selected font and setting the variable "frame-resize-pixelwise" to anything other than nul (default) solves the issue. I have added this line to my .emacs as suggested there: (setq frame-resize-pixelwise t) After restart emacs ...


5

See kill-emacs-query-functions, which lets you query yourself to confirm quitting, to avoid accidental quitting. See desktop.el, which lets you save most of the state of your session when you quit, and restores it at the next session. See the Emacs manual, node Saving Emacs Sessions. See also savehist.el and bookmarks.


5

Sorry, I'll rewrite my answer entirely from the beginning. Sometimes, a script is a clue to find the need font for Emacs. You can check which script a codepoint belongs to by follwing: (aref char-script-table ?🂩) playing-cards By specifying the script in font-spec, you may find the fonts, but it often fails because the script that is not contained in ...


4

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 Gtk. Note that this happens on local instances also, i.e. you don't have to forward X11 for it to happen. Just start emacs in daemon mode, fire up an emacs frame ...


4

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 --daemon Warning: due to a long standing Gtk+ bug https://gitlab.gnome.org/GNOME/gtk/issues/221 Emacs might crash when run in daemon mode and the X11 ...


4

It looks like you're not using the frame argument which is passed to after-make-frame-functions. Try something like this: ;; Per-frame/terminal configuration. (defun my-frame-behaviours (&optional frame) "Make frame- and/or terminal-local changes." (with-selected-frame (or frame (selected-frame)) (when window-system ;; Fira code for GUI ...


4

To disable dialog windows set use-dialog-box to nil (setq use-dialog-box nil)


4

As noted in scaevola's answer, the problem is visible-bell. Completely turning off both audible and visible bell may seem a bit drastic, though. Here's a homebrew version of visible bell that just flashes the mode-line – but excluding some cases where the user deliberately caused the condition triggering the bell: (setq ring-bell-function (lambda () (...


3

Since you're using my Emacs theme and could be using my emacs.d config, I suspect you have window-divider-mode enabled, which adds this border. You can either: Set the bottom border's width to 0: (setq window-divider-default-bottom-width 0) Turn off the bottom border: (setq window-divider-default-places 'right-only) or turn off window-divider-mode ...


3

I do not know for sure if the text becomes transparent, but this is what I use and I think works pretty well. However, if your font color is white, and you are reading a pdf with a white background color, even non-transparent text is going to be pretty hard to read. (setq transparency_level 0) (defun my:change_transparency () "Toggles transparency of ...


3

I believe that if system-configuration-features includes X11 then Emacs was compiled with X support. That value is set in configure by the HAVE_X11 variable being true (look for: emacs_config_features=), which in turn is based on window_system=x11 which you can trace back through a more complicated set of tests.


3

When using the flag --without-ns, that means do not build Emacs specifically for the MacOS platform. How about using --with-ns instead, or no flag at all? The build script should automatically build Emacs for MacOS when building on that platform -- i.e., when not using --with-ns or --without-ns. The package Emacs.app will be in the nextstep folder of the ...


3

I've wanted this too. (2021) Try the org-appear package, which can toggle emphasis, entities, and a few other things while your cursor is in the hidden text (not the entire line though). There are settings to choose which of these categories to display. (2019) Try my experimental code, which shows all the hidden characters on the current line. It works in ...


2

Use the following script, compiled as an application (via ScriptEditor): tell application "Terminal" try -- Tests if Emacs running already; throws error otherwise do shell script "pgrep Emacs" -- Emacs is already running, is it an actual process? do shell script "/usr/local/bin/emacsclient -c -n &" on error ...


2

Add a hook to the focus event. (add-hook 'focus-in-hook 'redraw-display). Thanks to Håkon Hægland for the Answer!


2

Assuming that you've configured with --with-ns (because you said it works if you open Emacs by clicking on the app icon), then you can start Emacs from the console in a couple of different ways. If you just want to start Emacs as an app then you can use the open command, so something like open nextstep/Emacs.app. The open command has a variety of arguments ...


2

I guess the encoding of your file is not properly detected. Typing C-x RET r windows-1252 RET should display your file properly as it forces Emacs to interpret the file as windows-1252 and not utf-8 (the default). If you want this file to always be opened with this encoding you can use a file-local variable.


2

I've settled with these home-made remakes of the obsoleted hooks: ;; Set up hooks to be run on focus in and focus out ;; Mutter sends spurious focus events, including sending focus out ;; events when Emacs never really was unfocused. ;; The timer filters out these false focus out events, while ;; checking the ‘last-focus-state’ allows ignoring repeated ...


2

Partial answer: you can have two buffers with the same content but different buffer-specific settings, such as different cursor positions (that aren't forgotten if the buffer isn't displayed in a window), different major modes, etc. This is called indirect buffers. Press C-x 4 c to create an indirect buffer for the current buffer and show it in a window. You ...


1

You can tell emacs the correct encoding adding a file local variable. Put -*- coding: windows-1250 -*- in the first line of the file or ;; Local Variables: ;; coding: windows-1250-dos ;; End: at the end. I used windows-1250 because the first line of the linked file is G bloiški, Ivan NOVAKOVIĆ with windows-1250 and G bloiški, Ivan ...


1

You can check display-graphic-p. See Display Feature Testing in the Emacs manual, there are a bunch of other display-*-p predicates for checking what display capabilities are available.


1

You may consider setting (setq confirm-kill-emacs 'yes-or-no-p) as described in https://www.gnu.org/software/emacs/manual/html_node/emacs/Exiting.html One convenient function to use as the value of confirm-kill-emacs is the function yes-or-no-p. The default value of confirm-kill-emacs is nil. And if you only want this to apply in the GUI version of ...


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