Generate Current Year tag in an Org Capture Template
A crucial aspect of maintaining organized and up-to-date notes is the use of Org Capture templates.
A crucial aspect of maintaining organized and up-to-date notes is the use of Org Capture templates.
I have enhanced selected-window-accent
functionality with blending options to blend colourize the selected window (see below):
I am of course using org mode for organizing my tasks, notes and other paraphernalia.
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.
Previously I wrote about the incompatibility of some Emacs themes with the tab-bar and my temporary fix:
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.
As an avid ArtRage user for almost 10 years I have in the past delved into the subtle art of editing arscript files:
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.
Using tabs as part of my workflow has enabled a nice encapsulation and collection of files per tab that I can quickly switch to.
I have updated my emacs package selected-window-accent-mode
Regarding my previous post, you can now disregard my little Frankensteinian elisp effort!:
I’m really enjoying ready-player at the moment, so much so I think it might end up replacing emms.
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’ve noticed that my Emacs blog is now almost 2 years old!
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.
More tinkering and enhancements to some AutoHotKey scripts with WOWEE to allow some emacs keybindings throughout the realm of Windows.
I have been continuing to tinker with this project over the last week…
My Emacs usage on Windows seems to be more prevalent at the moment, and I’m having to drop into Visual Studio for C# development.
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!)
Every now and then I find it necessary to use Vim! (mainly for work) - was that clickbait on an Emacs blog?! 😀
In a recent post I was talking about the benefits of mapping the RAlt key to the Ctrl key and this set up is so far still feeling very comfortable.
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.
Simply a link to my emacs literate config file
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.
The selected-window-accent-mode is now present on MELPA and is my first Emacs package!
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:
From my previous two posts regarding defining a Selected Window Accent some interesting posts from irreal arose, especially:
Given my previous post regarding accenting the current window:
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:
I can’t say that I’m completely happy with the way emacs marks some elements, namely :
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 using ArtRage, Krita and Infinite Painter for many years now but I thought I would try that other well known digital art tool… emacs!
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.
Here are the steps to create a new advent calendar.
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.
More improvements to my weight loss table, this time I have added the following:
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 have been using C-RET
or W
in dired
for a while now to open a file externally via browse-url-of-dired-file
.
For a while now I have been using org tables to represent and calculate pieces of data, obviating the need to open up a normal spreadsheet.
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.
It is not uncommon for me to want to revert my current buffer.
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 have just been been going through the new features added to emacs 29.1 and have been trying out the transparency or alpha-background
on sway
.
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.
After watching the latest informative video from Protesilaos Stavrou (Prot):
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.
Often I find myself refining my collection of photos and family videos, usually with the following process:
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 try and keep a simple colour scheme definition for my web site using some CSS variables:
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/
Just a quick one today!
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
Once a digital piece of art has been created then it is time to print it. A few tweaks are required in my image editor of choice and that is GIMP.
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.
As the title says, it is with a heavy heart that I have decided to move away from deft. There are a few reasons for this:
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.
Emacs is subsuming me! I have managed to get email up and running using mu4e and rss using elfeed and image viewing with image-dired
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 seem to be grepping a lot recently and I think the way I use deadgrep
can be improved a little.
Just a quick one.
I have been looking for a music player on Linux for a while now but haven’t really settled on one; I have simple requirements:
dired
can do most things for me especially now I have my DWIM image conversion scripts working and image-dired
configured to my liking.
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!
My next investigation into trying to improve my emacs workflow is expanding entered text for repetitive tasks.
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:
By default dired
orders its files in alphanumeric order and when s is selected it sorts by date according to :
Something is still bugging me with my dired tidy up and I think it is wanting to add the ability to remove dot files.
Bit by bit I am getting to grips with dired
and using this for more operations on my files.
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.
As my emacs keybindings journey continues to evolve and to delete more efficiently with delete word it has lead to an interesting issue for me.
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 currently polishing up my web page and I am now focussing on the little annoying formatting / alignment issues.
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.
My sacred emacs is taking 13 seconds to start up!
Steps to locally download emacs packages for offline installation.
-- mode: org; fill-column: 80; eval: (display-fill-column-indicator-mode 1); --