The original implementation of my/quick-window-jump worked perfectly for multi-window setups. It enabled you to assign character labels to each window, display them as overlays within the windows themselves, and jump to your desired window by typing its corresponding key. However, for setups with just two windows (a very common scenario in Emacs), this process felt unnecessarily complicated. Why go through the entire label-assignment process when a single key press could suffice?
Already I think I can improve my/quick-window-jump: which was a window jumping mechanism I created in my previous post which uses a unique key identifier for window navigation just like ace-window but condensed into a minimal elisp defun implementation.
I thought I would share a simple concept that I have found very beneficial: creating an Emacs init file that remains almost fully functional for my use but doesn’t include any external packages!
This post is more of a note to myself, something I can store in my single emacs blog org file, so if I forget again, I can quickly search.
I keep forgetting the keybinding to shrink and expand an org table.
I often define tables to have a narrower width than content using the <num> concept in the top line of the table, but when I want to expand, I just can’t remember the keybinding.
A search in *help* for org-table-shrink and org-table-expand reveals nothing!
In keeping with the ongoing effort to reduce friction in the venerable Emacs text editor, I realized that a common action I often perform is copying the entire contents of the buffer, usually for pasting elsewhere.
In this post, I’ll walk you through how I use an Org Babel block to generate a dynamic Org table based on Org headings.
This approach is handy for anyone who wishes to programmatically extract information from an Org file (such as TODO states, tags, and content) and automatically format it as a neatly structured Org table. You can then export this table to various formats — like HTML, Markdown, or LaTeX — with built-in Org mode support.
A crucial aspect of maintaining organized and up-to-date notes is the use of Org Capture templates.
I have currently always hard-coded/set the current year in my org capture templates for use when exporting/constructing my web pages and as a tag for some filtering / web index generation. Of course the main disadvantage of this is that I have to remember to update the year each year, of which I often fail miserably. ☹️
In my previous post about creating simple functions to create a new directory and file in dired, I received an interesting comment suggesting another way to bypass the potential messiness of completion and pass through the literal text input.
Today I’ll simply delve into two custom functions that I’ve had in my init file for quite some time, my/dired-create-directory and my/dired-create-empty-file
Just a quick one today. One of the great strengths of Emacs is its extensibility, I have mentioned before in adding the ability to disk report on the size of a directory in dired but I thought I would quickly revisit the topic, demonstrating the function I currently use.
In this post, I will describe the small enhancements and tweaks I have applied to eshell to make it feel more like a typical linux terminal using the fish shell and especially the inline autosuggestion feature that fish has out-of-the-box.
I thought I would share a little bit of elisp that I’ve been using for a while now that allows me to quickly find a file. It leverages completing-read, allows the selection of the find method and will search recursively.
A common activity for a Software Engineer is to compare two directories, especially those that might require a level of merging. My preferred tool of choice in this instance is Meld
What’s New in Selected Window Accent Mode v0.8.0 - (selected-window-accent-mode) which is my window accent package in MELPA for Emacs, here is a quick summary before I dive into the new features:
I really want to finally get to grips with my spelling / dictionary set-up.
I’m happy with jinx instead of flyspell. I like powerthesaurus and, of course, dictionary-lookup-definition. It is mainly the keybindings I want to finally settle on. I have been moving them around for a while now but haven’t really established something comfortable.
The next stage on my quest to mitigate any RSI issues when using Emacs on a laptop is to see if it is a viable option to use a mechanical keyboard on a laptop.
Based on my recent forays into ergonomic key-mapping in Emacs for SwayWM, and effectively for any Wayland compositor or X11-based system using the X Keyboard Extension (XKB) standard, I realized that there doesn’t seem to be an Emacs mode to edit these keyboard configuration files (*.xkb). This is surprising, considering they have been around for more than 30 years!
I thought I would provide an example of how I typically use elisp to make my life easier (well eventually - I still need to write the function after all!)
I am just at the moment reflecting on how my experience with Emacs over the last 30 years has evolved. I thought that just for fun I would list all the key moments along my Emacs journey regarding work-flow efficiency breakthroughs, roughly in year order!.
In the midst of adjusting my Emacs keybindings for a more ergonomic workflow, I’ve experimented with various configurations. For example, I duplicated the right Alt key (RAlt) to function as an additional Alt key allowing for versatile key presses across the keyboard based on command keybinding locations.
For my previous post I was talking about a software visual indicator to discern which key has been locked in a sticky key situation. For example there are typically two modes of stickiness, being latched and locked, by default I had set up the locked variant as I thought it would be more useful for Emacs and in fact I have found this to be the case. For example, double tapping the Control key allows nice easy single key navigation via ’n’ ‘p’ ‘f’ and ‘b’, possible page down with ‘v’ and to delete lines I can use ‘k’ .e.t.c.
From my previous post regarding setting up sticky keys mainly for Control, Alt and Shift in Emacs to remove the dependence on key chording I just wanted to scratch another itch, and that was to provide a modifier LED indicator type experience on a laptop that you would commonly get on a full size keyboard.
I spend many hours living in emacs and a large proportion of this time is using a laptop. Recently I have been thinking about my hands and how to protect them from any future pain or RSI.
I primarily use Emacs on a laptop, and unfortunately, Emacs isn’t inherently designed for ergonomic use. Coupled with the less-than-ideal typing experience of continuous laptop use, I’m considering adopting preemptive measures to protect my hands from potential strain injuries, including the infamous emacs pinky and RSI.
Now I have ditched save-desktop for recentf which gives me a faster startup time but still being able to quickly access my most common files (i.e. those I have most recently opened) I have realised that I would like to have quick access to other Emacs resources after a startup.
Now I am using the tab-bar workflow I noticed that winner-mode was not working per tab in that the winner undo would return to the previous state of another tab, pretty annoying! 😕
Periodically, I find myself in situations where I restart Emacs frequently, such as when tweaking my configuration or simply experimenting. During these phases, to achieve a swift start-up, I often resorted to clearing my ibuffer as I tended to have more of an automatic desktop-save type workflow for restoring Emacs sessions. However this would leave me with the task of manually reconstructing my previous session by reopening files.
For a while now I’ve been using an rsync based dired-copy replacement for large copy asynchronous operations within emacs. It is not uncommon for me to want to copy large files in emacs and rather than waiting for the operation to finish I leveraged async-shell-command to perform an rsync copy as thus:
Borrowing from the concept of a tiling window manager I thought that emacs could better indicate the currently selected window by a form of highlight/emphasis like the following:
Every now and then I find myself tweaking the look of emacs and have started to build up a list of my own common faces in custom-set-faces to suit my needs, for example here is my current setup:
I seemed to temporarily lose the rounded corners in SwayFX and I think the reason for this is that the gaps inner need to be a certain width, for example the following doesn’t seem to work:
I’ve been on the lookout for an efficient way to swiftly scan through org headings exclusively for a specified input string, akin to the functionality of isearch. This would enable me to promptly navigate to a past blog post which is typically stored under an org heading.
There are quite a few different ways to reduce power consumption on a laptop, most linux distros will be geared towards desktop, but I am always installing on a laptop, generally I was looking to use tlp but the options are quite bewildering and can be daunting so I was looking for something more lightweight and in fact garuda has a good starting point for this:
I was playing around with the look of emacs and thought it might be nice to have more control over the border between windows (I have now learnt that this is referred to as a window divider!)
I have been delving into the nuts and bolts of the Sway window manager lately and especially its fork SwayFX which adds a little eye candy in the style of Hyprland.
On a previous post I created an elisp function to quickly duplicate a file or directory in dired, by default it would copy the dired item under the cursor to an old suffix or append a number based on the universal argument.
For a while now I have been looking for a simple method in emacs for trimming down my largest files, usually this means locating those large image files and compressing them as I like keeping my media compressed or deleting any large files I didn’t know were lurking around my system.
I’m currently in the process of learning how to create graphical plots from org tables using gnuplot. I’ve noticed that it’s generally more straightforward to extract x-axis data from an org table column with incrementing numbers, as opposed to relying on gnuplot to potentially sort out data from an existing column (which may not be plot-friendly)
Now I have a weight loss org table defined and therefore an easy way to track the total amount of weight loss each week I had an idea for an improvement with some form of a satisfying graphical representation.
I am a tinkerer and of course emacs is a perfect vehicle for this mentality. A prime example of this is my constant evolving modeline. For many years the default modeline hasn’t presented itself as being a problem, but is it optimal for me?, the answer I have now realised is no, and I think I can do better for my use cases.
I have now managed to set up my external USB numeric keypad on Linux using kmonad which lets me use any regular plugged-in number keypad as a shortcut tool for my digital art.
Simply put here is me playing around with emacs transparency using alpha-background to set up sway the way I want it to look - I think there is some kind of well known term for this! (no neofetch involved 🙂)
Now I have set (pixel-scroll-precision-mode 1) which comes with emacs 29 this has led to an unexpected issue in that I now often get the following messages which cause a bell sound to be generated each time:
I am using the styli.sh script as my wallpaper changer in sway and with a little transparency and wallpapers from unsplash I can quickly switch randomly through my wallpaper images and get things looking pretty nice.
I am just starting to include more of my org files into org-agenda. By default C-c a a gives a show for the next 7 days but I think for now I would like something of a more calendarish overview with a long form look of scheduled and completed tasks.
I use Hugo to generate my web site and I made a decision early on to use ox-hugo withing emacs and to manage a single large org file with each subheading a blog post and each subheading tag representing… well, tags! I was aware of the concept of defining categories but decided to sort that out at a later date until I really understood what I was doing - this is a common thing that I do.
I have decided to switch my linux file manager from Dolphin to Thunar and this means transferring the context sensitive menus I have set up through KDE Plasma to using Thunar’s custom actions.
It is not uncommon for me to want the ability to quickly duplicate a file, especially if I am hacking around and just want a quick snapshot of a working file.
I recently reinstalled my laptop and copied across my git repositories from an external backup drive. However most of my repositories were flagged by magit as having been updated mainly with the following issue on multiple files:
While currently piecing together my git repositories and figuring out which files to commit I am invariably going to have some Untracked files but I also would like to see the Tracked files in magit-status
I am currently hacking around with my org files and in fact macro removing quite a few unnecessary lines. However this has had the side effect of leaving some significant holes in the form of blank lines. Sometimes just two duplicate blank lines and sometimes more!
I had tried to implement a debugging logging/print method myself using macros but hadn’t really achieved the level of elegance outlined in https://xenodium.com/sprinkle-me-logs/
I am finding occur extremely useful, from building an index from my emacs init file to searching through org headers to generally just having my isearch all there in a single window.
Sometimes I can find a blinking cursor distracting and somewhat expectant!, so currently I am favouring a solid non blinking cursor while still being able to easily locate my cursor using hl-line-mode
Since I keep all my emacs configuration in a single .emacs file and in a hyper organised manner it means I have my init file split into different sections, for example :
Well as always a little more time with emacs a little feedback and then finding more about org I have now figured out (I think) how I can better sort tags in an org file. In my previous post:
I use a package called org-rainbow-tags which adds random colours to org tags to provide a consistent colour between identical tags. This helps to identify common tags throughout the file but has the side effect of emphasising the lack of my coherent tag ordering.
Emacs isn’t my only obsession, I like to create digital art and for that I use ArtRage. The interesting thing about ArtRage is that each brush stroke or editing action can be recorded in a text file or script for later playback. I use this facility for creating time-lapses.
Now that there is a build for emacs on Android I thought I would try and develop an emacs workflow between my Galaxy Note 8 / Galaxy Tab S7+ and my linux laptop.
I have been evolving my way through many differing ways of grepping recently from standard built-in greps to a few ripgrep front ends until I finally settled on deadgrep
Often I find myself requiring the most rudimentary of methods of debugging and that is to push text to standard output from within a running executable to indicate the logical structure of a program.
After watching an interesting video by EmacsElements regarding commenting and un-commenting I have to say that I wholeheartedly agree. I really don’t like the way comment-dwim works and made me think back to one of the first elisp functions I commandeered from the interwebs :
I have written before about smooth scrolling using good-scroll and how I managed to find a semi satisfactory way of centering my cursor after a single scroll which meant I would then have a minimal amount of subsequent line movement to get to the line I want.
Given my recent forays into the world of grepping in emacs using deadgrep (and hence ripgrep) and my use of find-file-rg which feeds into my current completion system of ivy I think the next step is to try to set up a project and to see if I can gain any advantages in my workflow.
I have just started the process of reducing the number of org files I maintain for my web site. I now have a greater understanding of how Hugo handles these files and I think can both simplify and make them more flexible.
This year I have been starting to archive anything of interest from the family VHS collection. There are certainly slim pickings and it is difficult to find anything when most of the 200+ videos contains either a western or a Dire Straits concert!
This post isn’t strictly about what can be achieved within the emacs ecosystem but what can be achieved outside it while still binding to the workflow principles of org mode.
Well this is quite a turn up for the books, I seem to have already quickly moved on from emacs ripgrep-regexp! to something better and that is a package called deadgrep
I have come to the realisation that I can be a little more efficient when it comes to searching for text within files, or as it is known in software engineering circles, grepping!
I previously wrote about wanting the ability in emacs to copy and paste files from one window to another just like a linux GUI file manager and after a little hunting around and experimentation I settled on putting together some elisp:
Something has been nagging at me for a while now, I seem to spend a lot of time moving the cursor to the next or previous line within a window, spamming C-n and C-p to get where I want to within a file.
I am currently keeping all my textual notes in a separate org file called appropriately, notes.org. This is pretty much just a random rambling set of text containing bits and bobs that I don’t want to forget.
My dired replacement of Dolphin / linux terminal continues. The next thing is something useful to me but uncommon and something that dired didn’t seem to be able to do out of the box.
Now dired is becoming more ingrained into my muscle memory, navigating efficiently through the folder structure is becoming more prominent in my mind and it still doesn’t feel natural enough.
The next step in my emacs journey is to move files around a little more easily, in fact more like a regular file explorer using the concept of file / folder selection copy and paste. That concept seems a little more natural to me than dired file marking, renaming / copying and then entering the path of the destination address.
I am having a bet!, it is one of my few vices, and it shall be on the horses. I don’t often have a bet and in fact I generally only ever have a bet on a special occasion, like the grand national or a random parallel bet with my dad.
Now I am appreciating the power and simplicity of ripgrep and have it available on all my systems I was hunting around emacs to see the best way to leverage this tool for quick file searching.
I was recently reading a post about deleting files from within emacs and pushing them to the local Trash, this seems like a good idea especially now I am using dired more often.
Currently I am just displaying the title of my posts with no filtering. Now that I have developed a general format to help with some emacs Deft categorisation I have run into a little bit of a problem.
I am just playing around with writing some sort of “techy” blog, trying to focus on a couple of my favourite things in the world, namely linux and emacs, so I thought I would do the best productive thing in the world and just start to type.