Some Elisp package compilation failures are caused by not setting the loadpath correctly. It mostly happens when you compile source from a directory that is not the current working directory. For example:
1
elisp-compileelisp/*.el
In most cases you can cd or override the S variable to set it to location where ELisp source resides.
But in other cases you can append to load path the directory with source, see:
elisp-make-autoload-file allows to name the generated autoload file. For sake of easier debugging and writing Gentoo SITEFILEs, please do not rename the generated file.
The name of that file should always be ${PN}-autoloads.el.
Use new elisp-enable-tests function
elisp-enable-tests allows to set up IUSE, RESTRICT, BDEPEND and the test runner function for running tests with the specified test runner.
The 1st (test-runner) argument must be one of:
buttercup — for buttercup provided via app-emacs/buttercup,
ert-runner — for ert-runner provided via app-emacs/ert-runner,
ert — for ERT, the built-in GNU Emacs test utility.
The 2nd argument is the directory where test are located, the leftover arguments are passed to the selected test runner.
Example:
1 2 3 4 5 6 7 8 910
EAPI=8
inheritelisp
# Other package settings ...SITEFILE="50${PN}-gentoo.el"DOCS=(README.md)
elisp-enable-testsbuttercuptest
Remove empty SITEFILEs
Recently a feature was added to elisp.eclass that will cause build process to generate the required SITEFILE with boilerplate code if it does not exist.
So if your SITEFILE looked like this:
1
(add-to-list'load-path"@SITELISP@")
… then, you can just remove that file.
But remember to keep the SITEFILE variable inside your ebuild:
1
SITEFILE="50${PN}-gentoo.el"
Remove pkg.el files
The *-pkg.el files are useless to Gentoo distribution model of Emacs Lisp packages and should be removed. It is as simple as adding this line to a ebuild:
1
ELISP_REMOVE="${PN}-pkg.el"
Beware that some packages will try to find their ${PN}-pkg.el file, but in most cases this will show up in failing package tests.
Use official repository
It is tedious to repackage Elpa tarballs, so use the official upstream even if you have to snapshot a specific commit.
To snapshot GitHub repos you would generally use this code:
1 2 3 4 5 6 7 8 910
# First check if we have the correct version to prevent# autobumping package version without changing the commit.[[${PV}==*_p20220325]]&&COMMIT=65c496d3d1d1298345beb9845840067bffb2ffd8
# Use correct URL that supports snapshots.SRC_URI="https://github.com/domtronn/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"# Override the temporary build directory variable.S="${WORKDIR}"/${PN}-${COMMIT}
Git is good, git tags are good. In case if upstream does not tag their package or just forgets to, kindly ask them to create a git tag when bumping Emacs package versions.
Company-Ebuild should pull in app-emacs/ebuild-mode, if that does not happen, then report a bug ;-D
Standard
Add the following to your user's Emacs initialization file. The initialization file is either ~/.emacs.d/init.el or ~/.config/emacs/init.el for newer versions of GNU Emacs.
The :defer t and :mode "..." enable deferred loading which theoretically speeds up GNU Emacs initialization time at the cost of running the whole use-package block of ebuild-mode configuration when the :mode condition is met.
Adding the above to Your Emacs config will cause Emacs to start a daemon after it is opened (and no other Emacs servers are running), this also does not require --daemon flag.
After the daemon is started You can open files by right-clicking on them and selecting to open them in "Emacsclient".
Furthermore: You also utilize --iconic and add emacs --iconic to your Plasma startup. This is way better than using emacs --daemon because you can just click on your taskbar to open the minimized Emacs window. Also, Emacs will load all Your graphical libraries and configurations so Your theme will look properly and not as if Emacs was being used on the console.
Breeze theme
Sadly I have not found any theme that would look like Plasma. I use the spacemacs theme which looks a little bit similar, especially the background color comes close to Breeze's dark background color.
Note that the theme which You load with the function load-theme is a different thing that the GTK theme Emacs uses.
The GTK theme should be enabled if Your Emacs version is built with GTK support. On Gentoo this setting is controlled with the gtk USE flag. Also the flag toolkit-scroll-bars can be enabled for a look of scroll-bars consistent with the selected toolkit.
Xresources
There is a different approach to theming Your Emacs that loading a theme defined in ELisp - You can use a ~/.Xresource file.
If you do not load any theme in your configuration Emacs will by default read the .Xresources file, unless the --no-x-resources flag is used.
Here are a few Xresources config files that come close to the default Breeze theme:
Emacs can be built with FreeDesktop's D-Bus support to communicate over the dbus protocol. This can come handy when using ERC as it has a setting to enable desktop notifications on mentions (erc-desktop-notifications.el).
The dbus interface can also be utilized to query desktop-oriented daemons, for example this library talks to the Bluetooth daemon.
KDE development
Those are some ELisp libraries that I found while browsing GitHub, they might be useful for somebody who delves into KDE app development.
Opening files in different applications
In addition to async-shell-command and start-process-shell-command I wrote this small library that may come handy.
Outside Emacs, inside Plasma
Sadly the KDE team did not add support to emulate Emacs-like keys in Plasma itself, but some applications like, for example Kate have configuration options to customize the key bindings. This is a repository explaining how to setup Kate's bindings.
Huge thanks to Sam James and Arthur Zamarin for support and interest in getting this feature done.
Installation
Unmasking
The Flycheck integration is unreleased as of now, this will (hopefully) change in the future, but for now You need live versions of snakeoil, pkgcore and pkgcheck.
The lines with :ensure nil are there to prevent use-package from trying to download the particular package from Elpa (because we use system packages for this configuration).
I imagine that a web browser should have been a "window" to the Internet world that provides easy and efficient way to graphically access resources exposed by multiple protocols: HTTP(S), (S)FTP, Gopher, Gemini, etc…
How it is?
Only few protocols are supported!
Recently FTP support got "deprecated" in Firefox. It can still be enabled in
by setting network.ftp.enabled to true. FTP support is announced to be completely gone in FF 90. Chrome dropped FTP some time ago. # BUT! Luckily we have Emacs! GNU Emacs has packages to support all kinds of protocols. - eww which is a simple HTTP(S) browser like w3m (also renders images) - tramp allows you to access files by SSH - elpher allows you to access Gemini and Gopher sites (graphically) - ange-ftp allows you to connect to FTP servers - and finally net-utils which wraps around system utilities to provide interactive mode for many protocols, ie.: gopher, irc, ntp, pop3, www