Entries tagged “Emacs”
Change How Repeated Tasks Are Displayed in Org Agenda
Wai Hon provides a complete solution to customizing how repeated tasks are displayed in Org Agenda:
In the Org agenda view, repeated and non-repeated tasks look the same. I always hesitate to mark a repeated task as done because I might forget to set the repeater (e.g., +3d) and the task would then never reappear.
I haven’t thought about this issue. That doesn’t take away anything from this very interesting solution though.
How Interval Repeaters Work in Emacs Org Mode
Daniel Liden’s article exemplifies in a very succinct and clear way
how the different repeaters behave in Org mode.
He focuses mostly on the special ones: .+
future date from last repeat
and ++
future date matching the original repeating schedule.
I recently started using org-mode to keep track of a few habits (morning meditation, getting some sunlight and exercise before my morning coffee, etc.) and needed to make use of org-mode’s calendar features to do so. I’ve previously set deadlines and scheduled dates for my TODO entries, but have seldom used repeat intervals. My early attempts ( date +1d) worked fine but required some extra steps if I ever missed a day. This post discusses the .+ and ++ -style repeat intervals, which allow more control over what happens when you complete a task after the scheduled date.
easysession.el Emacs Package for Handling Sessions
The author uses easysession.el by setting up each session to represent a distinct project or a specific “view” on a particular project, including various tabs (built-in tab-bar), window splits, dired buffers, and file editing buffers. This organization allows for the creation of dedicated environments for different tasks or aspects of a project, such as development, debugging, specific issue, and documentation. The author switches between projects and views of the same projects multiple times a day, and easysession.el helps significantly by allowing quick transitions between them.
Prot's Basic and Capable Emacs Configuration
I am learning a lot from Prot’s articles on Emacs. This last article:
What follows is a rather simple, yet fully capable, setup to get started with Emacs.
Here’s what I learned from it.
I have replaced the custom.el
related code from:
(progn
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file)
(load custom-file)))
with the simpler, more legible:
(setq custom-file (locate-user-emacs-file "custom.el"))
(load custom-file :no-error-if-file-is-missing)
Then, it’s the code snippet for preventing the Warnings buffer popping up. So useful!
An Intro to Emacs packages Vertico, Consult, Marginalia, Orderless, Embark by Protesilaos Stavrou
This video from Protesilaos Stavrou provides a good overview of the Emacs packages: Vertico, Marginalia, Consult, Orderless, Embark. The post also provides the basic configuration for these packages.
TIL Emacs Orgmode org-link-set-parameters
Jeremy Friesen in “Exporting Org Mode Elfeed Links”
I write up a use case around exporting elfeed links and then provide some code that implements that use-case, wrapping up with a quick overview of the other types of links I’ve implemented in Org-Mode.
Initially I thought this is new to me.
I knew I have some custom handlers in my init file,
for handling links to Messages, OmniFocus, DayOne,
and thought those were implemented differently.
But no, my custom handlers are using org-link-set-parameters
too.
Emacs Optionally Saving Desktop on Exit With Confirmation
I recently read an article about connecting different Emacs functions; unfortunately I can’t recall the title or url of the article.
After having the idea of that article in the back of my mind for a bit, it connected with one of the things I wanted to do with my Emacs: give myself the option1 to save the state of Emacs upon exiting.
I knew about Saving Emacs Sessions.
The only remaining thing was connecting desktop-save
to killing Emacs.
Fantastic Configuration for Emacs view-mode
I just learned about Emacs view-mode.
Documentation of this minor mode is minimal.
The way I see it,
it’s sort of a read-only mode.
Except, it’s not the Emacs read-only-mode
that you can toggle with C-x C-q
.
Anyways, Emacs view-mode adds scrolling up and down
using SPC
and S-SPC
or DEL
respectively.
Which seems like very minimal functionality.
That until you get Charles Choi’s view-mode configuration which makes Emacs view-mode a lot more useful. To pique your interest, Charles Choi adds file-structure-based navigation bindings.
Emacs use-package Essentials with Protesilaos Stavrou
Protesilaos Stavrou:
In this ~35-minute video I demonstrate the main features of the ‘use-package’ configuration macro that is built into Emacs 29. It is the de facto standard for setting up packages and is designed to make Emacs faster to start up and more robust overall.
The quick explanation about autoloading is nice.
After watching this video,
I started to move all my configs
within use-package
blocks.
I don’t know if it’s correct or not,
I’ve used emacs
, misc
, server
, frame
as “packages” to group settings.
Key Binding and Function to Jump to Emacs Completions Buffer
Updated with a second solution. Both are useful. The new one is simpler.
I have recently disabled Ivy/Counsel/Swiper in my Emacs setup1.
One of the first things that I experienced, after disabling Ivy & friends, was a new interaction mode with completions.
When trying to complete something in the minibuffer, completion candidates are displayed in the *Completions* buffer which is conveniently displayed right above the minibuffer.
What confused me about this behavior was the need
to use the mouse to move to this buffer.
Using other-window
(C-x o
) wasn’t working
as it moved the point to the top buffer.
Emacs OrgMode: Reports About Clocked Time
The other day I discovered, by mistake or better said by mistyping,
the OrgMode org-clock-display
function which is bound to C-c C-x C-d
.
What does org-clock-display
do?
It creates an overlay
that displays clocked times for the entier buffer.
Simply said: it does some accounting on clocked time
and displays it without changing the underlying buffer.
Once you are done, you remove the overlay using org-clock-remove-overlays
.
Looking for similar or related functions,
I also found the OrgMode org-clock-report
function
which creates a table-based report for the clocked time.
This table is added to the heading
on which the function was run.
Compared with the org-clock-display
,
this report is written to the file.
Making Emacs Imenu More Visible, More Useful
Super useful hints from Charles Choi on how to make Emacs Imenu both more visible and implicitely more useful:
My guidance is to turn on the index menu in the Emacs UI for modes that support it. The benefits to this are:
- One can always discover and access the index in the main menu.
- Even if one prefers a keyboard-driven workflow, recalling either the command (imenu) or some user-defined binding to it can be reinforced by visually seeing “Index” in the menu bar.
Check TIL Imenu by Charles Choi.
Why Having Multiple Emacs Themes if Not Cycling Through Them
I don’t think I’m alone in having multiple Emacs themes installed. Am I?
After trying many, I have kept just a few:
- acme,
- gruvbox,
- material,
- nano,
- nova,
- plan9,
- solo-jazz,
- twilight-bright
There are a few great themes that I like from those coming with Emacs:
- adwaita
- dichromancy
- leuven
- modus-operandi
- tango
- tsdh-light
- whiteboard
At this point I reached my dilemma.
With so many themes available, how can I experience them all?
Enter my new Emacs daily theme cycle:
A Short Elfeed Story: From How Do I Get a Link to Copy as Markdown
Last night I left some unread articles in Elfeed. Reading RSS in Emacs gives me a great fuzzy, geeky feeling. So even if I’m a long time Reeder user, most recently I’ve been using Elfeed more and more. Even more since I have found how to patch a bug that was making it unsable; but I’m getting in the wrong direction.
While in Elfeed, I asked myself: how do I get the link of the current item I’m
reading? Bringing up the mode help, I landed my eyes on
elfeed-kill-link-url-at-point
bound to c
. It took me a bit to realize that
this was not what I was looking for; still a very useful functionl. What I was
looking for is elfeed-show-yank
bound to y
. I am happy already. Again the
thought that “Emacs gives you everything. And more. You just need to keep
looking” popped in my mind. And I was ready to move on.
Automatic Clock in in Org Mode
I have stared to use Org’s clocking feature— a feature that helps tracking the time worked on a specific task. As everything in Org mode and Emacs, this feature is enabled through a series of functions, configuration options, variables, and bindings.
After using it for a couple of weeks, I have noticed that I am usually performing two actions one after the other:
- switch the task into “WIP” state
- clock-in
Would it be possible to automatically perform these two actions together? It’s Emacs and I assumed the default answer is yes.