Customizing Emacs
Emacs is an extensible, customizable, real-time display editor. At the core of Emacs is the Emacs Lisp interpreter, in which the majority of Emacs' built-in functionality and extensions are implemented.
The QNX Developer Desktop comes with a basic Emacs configuration located at ~/.config/emacs/init.el, which is shown below:
; By default Emacs inserts tabs in place of multiple spaces. Turn this off.
(setq-default indent-tabs-mode nil)
; Set default tab width to 4
(setq-default tab-width 4)
; Set default tab width to 4 in files of language similar to C
(setq c-basic-offset 4)To start Emacs, either run emacs from the Terminal, or launch it from the Applications tab: Applications > Development > Emacs.
To create a client mode shortcut, there is a file in ~/.local/share/applications/ called emacsclient.desktop. Edit this file and remove the line NoDisplay=true:
--- a.local/share/applications/emacsclient.desktop
+++ b.local/share/applications/emacsclient.desktop
@@ -6,7 +6,6 @@ MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;tex
Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec /usr/bin/emacsclient --alternate-editor= --reuse-frame \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F
Icon=emacs
Type=Application
-NoDisplay=true
Terminal=false
Categories=Development;Utility;TextEditor;
StartupNotify=trueEmacs looks for it's configuration entrypoint in ~/.emacs, ~/.emacs.el, ~/.emacs.d/init.el, and ~/.config/emacs/init.el.
- For more information on the background and development of Emacs, refer to the Emacs Wikipedia article: https://en.wikipedia.org/wiki/Emacs.
- For more information on Emacs usage and some tips and tricks, refer to the ArchLinux Emacs wiki article: https://wiki.archlinux.org/title/Emacs.
- For an introduction to Emacs Lisp, refer to the Emacs Lisp Introduction: https://www.gnu.org/software/emacs/manual/html_node/eintr/index.html#SEC_Contents.
- The Emacs manual: https://www.gnu.org/software/emacs/manual/html_node/emacs/index.html.
For more in-depth configurations, refer to the emacs-from-scratch repository: https://github.com/daviwil/emacs-from-scratch.
