🏆 I provide private lessons on Emacs, Linux, and Life in general: https://protesilaos.com/coach/. Lessons continue throughout the year.

Change Log of Spacious Padding

Increase the padding/spacing of Emacs frames and windows

This document contains the release notes for each tagged commit on the project’s main git repository: https://git.sr.ht/~protesilaos/spacious-padding.

The newest release is at the top. For further details, please consult the manual: https://protesilaos.com/emacs/spacious-padding.

1. Version 0.5.0 on 2024-04-29

This is a bug fix release.

1.1. Starting a frame from the daemon/server works as well

Before, if Emacs would start as a new server process via a client, it would not set the faces and the frame parameters correctly.

I have made sure this no longer happens, so the padding/spacing should look as expected at startup no matter what.

Thanks to tusharhero and Julian Flake for reporting this and testing the updated code. It was done in issue 13: https://github.com/protesilaos/spacious-padding/issues/13.

1.2. The padding of relevant elements can be set to 0

This concerns anything that has a box with padding around it. From the user option spacious-padding-widths, we have the following attributes:

  • :tab-width
  • :tab-bar-width
  • :tab-line-width
  • :header-line-width
  • :mode-line-width

Thanks to Ruby Iris Juric for the contribution. It was done in pull request 7: https://github.com/protesilaos/spacious-padding/pull/7.

The change is less than the 15-line limit, so Ruby does not need to assign copyright to the Free Software foundation.

1.3. The right-divider-width has a fallback value at all times

This means that even if the :right-divider-width is not included in the value of spacious-padding-widths, there will still be a padding in place. We were already doing this for other scenaria, but not for this specific case. Thanks to Stefano Rodighiero for bringing this matter to my attention in issue 11: https://github.com/protesilaos/spacious-padding/issues/11.

1.4. Reasonable defaults even if spacious-padding-widths is set to nil

All the attributes of the spacious-padding-widths should be optional and the value could even be nil. We take care internally to use a reasonable fallback value. We do this on the assumption that the user who enables spacious-padding-mode does actually want “spacious padding” and not something that does nothing.

2. Version 0.4.0 on 2024-03-04

This version add some quality-of-life improvements to an already solid package.

2.1. The vertical border can now remain visible

The user option spacious-padding-widths is the single point of entry for all types of padding supported by the package. The property :right-divider-width applies to the vertical border between windows. When it is set to 1 pixel in width, it is no longer made invisible. Higher values do make it invisible, to produce the padding effect.

Spacing between windows can still be increased by modifying the now-supported fringes (more below, including a code sample).

Thanks to Aronne Raimondi for suggesting the possibility of a visible divider. This was done via a private channel and the information is shared with permission.

2.2. Add padding to the window fringes

The fringe area is the space to the left and right side of every window where indicators such as for line continuation/truncation are displayed. The user option spacious-padding-widths can now be configured to either (i) apply the same width to both fringes, per the :fringe-width property, or (ii) set different width values for either side with :right-fringe-width and :left-fringe-width.

The default value is 8, which the standard width of fringes. This means that there is no visible change for users unless they opt to modify the relevant value.

Sample using the default:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-width 4
         :right-divider-width 30
         :fringe-width 20 ; Make both fringes 20 pixels wide
         :scroll-bar-width 8))

Or this for individuated values:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-width 4
         :right-divider-width 30
         :right-fringe-width 20 ; Make the right fringe 20 pixels wide
         :left-fringe-width 8 ; Make the left fringe 8 pixels wide
         :scroll-bar-width 8))

When combined with the aforementioned setting to keep the window divider visible, we can have something like this:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-width 4
         :right-divider-width 1 ; Keep a visible vertical line between windows
         :fringe-width 20 ; Make both fringes 20 pixels wide
         :scroll-bar-width 8))

2.3. The built-in tab-line-mode is also covered

Previous versions of the package provided stylistic support for tab-bar-mode. This is now extended to tab-line-mode. Thanks to Lucas Gruss for providing the impetus for this inclusion in pull request 6: https://github.com/protesilaos/spacious-padding/pull/6.

Building on that, all tabbed interfaces are subject to the property :tab-width of the spaicous-padding-widths. A granular configuration is also possible with the :tab-bar-width and :tab-line-width.

Thanks again to Lucas Gruss for suggesting this arrangement. We discussed this as a follow-up to Lucas’ contribution in commit 1bbc076. The discussion took place in the context of pull request 6: https://github.com/protesilaos/spacious-padding/pull/6.

Using the default value of spaicous-padding-widths as a starting point, we can thus have the following:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-width 4 ; `tab-bar-mode' and `tab-line-mode' are uniform
         :right-divider-width 30
         :scroll-bar-width 8
         :fringe-width 8))

Or this:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-bar-width 4 ; `tab-bar-mode' has a padding of 4 pixels
         :tab-line-width 2 ; `tab-line-mode' has a padding of 2 pixels
         :right-divider-width 30
         :scroll-bar-width 8
         :fringe-width 8))

2.4. No more SourceHut

Development continues on GitHub with GitLab as a mirror.

I explained my reasons here: https://protesilaos.com/codelog/2024-01-27-sourcehut-no-more/.

This is a change that affects all my Emacs packages.

2.5. Miscellaneous

  • The properties of the user option spacious-padding-widths accept a nil value when configured via the Custom user interface, customize-set-variable, setopt, or related.
  • The vertical-border face is explicitly supported. This ensures that colours are the way we need them to be.
  • The manual reflects all of the above.

3. Version 0.3.0 on 2023-12-21

3.1. Enjoy the optional subtle mode lines

The new user option ~spacious-padding-subtle-mode-line makes mode lines more subtle. It does so by removing the background and adding an overline in its stead.

By default, spacious-padding-mode does not refashion the mode lines other than adding to them some extra padding (per spacious-padding-widths). The user option spacious-padding-subtle-mode-line does change the mode lines so that instead of a background they only have an overline, while preserving whatever padding is in effect.

The value bound to spacious-padding-subtle-mode-line is either a boolean type or a plist. If it is non-nil, use the foreground of the underlying mode line face to derive the color of the overline.

If the non-nil value is a plist read the following keys to determine the exact style of the overlines.

  • :mode-line-active refers to the active/current mode line.
  • :mode-line-inactive refers to the inactive/non-current mode lines.

Each key accepts either a face or a string representing a color as its associated value:

  • The face is an unquoted symbol, such as success or shadow, whose :foreground attribute is queried to extract the desired color value.
  • The color is a name among those listed in the output of the command list-colors-display or a hexadecimal RGB value, such as #123456.

If the key is missing or its value is not one of the above, fall back to reading the foreground of the underlying mode line face to determine the color of the overline.

Examples of valid configurations:

;; Use the foreground of the underlying mode line face to determine
;; the color of the overline (e.g. the inactive mode line has gray
;; text, so render the overline in the same gray).
(setq spacious-padding-subtle-mode-line t)

;; Use the foreground of the `error' face (typically a red hue) for
;; the active mode line's overline.  For the inactive mode line, fall
;; back to the foreground color of the underlying face (as in the case
;; of the t shown above).
(setq spacious-padding-subtle-mode-line
      '(:mode-line-active error))

;; As above, but now use the foreground of the `shadow' face for the
;; inactive mode line.
(setq spacious-padding-subtle-mode-line
      '(:mode-line-active error :mode-line-inactive shadow))

;; Use color values directly.
(setq spacious-padding-subtle-mode-line
      '(:mode-line-active "#0000ff" :mode-line-inactive "gray50"))

3.2. Expanded the documentation

The spacious-padding package now comes with an Info manual. When looking at the source code, this is done in the README.org file, which the GNU ELPA machinery automatically converts to Info. A change log is also provided.

Their respective web links are these:

4. Version 0.2.0 on 2023-11-24

[ I provide screenshots in a recent publication: https://protesilaos.com/codelog/2023-11-15-spacious-padding-extra-ui-dev/ ]

The package is stable and works well. This set of changes expands the concept of “spacious padding” to more user interface elements, namely:

  • active and inactive mode lines;
  • header line;
  • the tab-bar-mode.

The user option which sets all the width values is spacious-padding-widths. It now reads keywords that correspond to the aforementioned elements. Concretely, here are the defaults:

(setq spacious-padding-widths
      '( :internal-border-width 15
         :header-line-width 4
         :mode-line-width 6
         :tab-width 4
         :right-divider-width 30
         :scroll-bar-width 8))

After changing the widths, reload the spacious-padding-mode for changes to take effect.

I have taken care to make ’spacious-padding-mode’ work even when the spacious-padding-widths does not include all keywords. This means that the previously supported value will continue to work (the previous value did not have the keywords header-line-width, mode-line-width, and tab-width).