<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>dot life</title><id>https://p-snow.org/feeds/tags/emacs.xml</id><subtitle>Tag: emacs</subtitle><updated>2026-06-20T20:26:42Z</updated><link href="https://p-snow.org/feeds/tags/emacs.xml" rel="self" /><link href="https://p-snow.org" /><entry><title>Org Web Track</title><id>https://p-snow.org/org-web-track.html</id><author><name>p-snow</name></author><updated>2024-06-09T20:19:00Z</updated><link href="https://p-snow.org/org-web-track.html" rel="alternate" /><content type="html">&lt;p&gt;
There has been a small but persistent desire for years in my mind to grapple with fluctuating data from the web, such as the price of items on my wish list, scores for my social media status, or ratings for my book on Amazon. One day, the desire compelled me to create a personal data management system with Python and PostgreSQL, and another day it urged me to take advantage of &lt;a href=&quot;https://n8n.io/&quot;&gt;n8n&lt;/a&gt;, the web workflow automation tool. Unfortunately, neither attempt was successful.
&lt;/p&gt;&lt;p&gt;
Finally, I encountered Emacs and Org Mode. Through my experience with Org Mode, I have learned that a data management system for personal use should not be as elaborate and versatile as using a DBMS, but rather more concise and straightforward. As a result of trial and error, the desire materialized as &lt;a href=&quot;https://github.com/p-snow/org-web-track&quot;&gt;org-web-track&lt;/a&gt;, my initial Emacs package now &lt;a href=&quot;https://melpa.org/#/org-web-track&quot;&gt;available on MELPA&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
org-web-track provides a management framework for data that varies over time on the web, such as production prices. With this package, you can retrieve, overview, and utilize the data. Below are the main features.
&lt;/p&gt;&lt;ul class=&quot;org-ul&quot;&gt;
&lt;li&gt;Supports web APIs as well as static pages.&lt;/li&gt;
&lt;li&gt;The data to track can be designated by CSS selector.&lt;/li&gt;
&lt;li&gt;Tracking items can be viewed collectively in an Org table with their updated values.&lt;/li&gt;
&lt;li&gt;Past values are stored and can be utilized for tasks such as creating graphs.&lt;/li&gt;
&lt;li&gt;Further extension examples are in the manual, such as email notifications when a value meets a condition.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;
Please refer to &lt;a href=&quot;https://github.com/p-snow/org-web-track/blob/main/README.org&quot;&gt;the manual&lt;/a&gt; for more details. Enjoy!
&lt;/p&gt;</content></entry><entry><title>git-annex resolves the issue of org and binary file separation</title><id>https://p-snow.org/git-annex-resolves-the-issue-of-org-and-binary-file-separation.html</id><author><name>p-snow</name></author><updated>2023-12-08T17:50:00Z</updated><link href="https://p-snow.org/git-annex-resolves-the-issue-of-org-and-binary-file-separation.html" rel="alternate" /><content type="html">&lt;p&gt;
If you are an avid Org Mode user and a life logger like me, chances are you have your Org files stored in a Git repository. Even if you manage to represent your life in textual data, there are often cases where you should or need to utilize a more eloquent data format. Notifications from the municipality are often in PDF format, memories of your family members are typically stored as JPEG or MKV files, and the program on which your research relies is an EXE file. It is impractical to include these binary files in your Git repository. But how do we manage them in conjunction with Org files? This is where &lt;a href=&quot;https://git-annex.branchable.com/&quot;&gt;git-annex&lt;/a&gt; comes to the rescue.
&lt;/p&gt;&lt;p&gt;
Similar to &lt;a href=&quot;https://git-lfs.com/&quot;&gt;Git LFS&lt;/a&gt;, git-annex is designed to deal with binary data in Git repository. With git-annex, your existing Git repository can handle binary data in addition to managing text data in a familiar way. With your upgraded binary-ready Git repository, you can use hyperlinks or &lt;a href=&quot;https://orgmode.org/manual/Attachments.html&quot;&gt;org-attach&lt;/a&gt; in Org files where both the referrer (org) and the referent (binary) are in the same hierarchy.
&lt;/p&gt;&lt;p&gt;
Since binary files tend to increase in size, some Git repository instances may not have enough space to store all the binary files themselves. git-annex can address this issue by managing the number of copies for each binary file. For example, the Git repository on the NAS at home contains copies of all binary files, while the one in cloud storage only includes the smaller, more significant files. git-annex implements this feature by utilizing Un*x symlink mechanism. git-annex also offers a wide range of functionalities. You can explore some of them by following this &lt;a href=&quot;https://git-annex.branchable.com/walkthrough/&quot;&gt;walkthrough&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
Our esteemed editor, Emacs, has a reliable package for managing git-annex within Emacs. The package's name is quite straightforward: &amp;quot;&lt;a href=&quot;https://github.com/jwiegley/git-annex-el&quot;&gt;git-annex&lt;/a&gt;&amp;quot;. With this package, you can easily manage annexed files in Dired, making it extremely user-friendly.
&lt;/p&gt;&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(use-package git-annex
  :ensure t
  :after dired)
&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;
If you are facing difficulties in finding a suitable place for your valuable yet large binary files, give git-annex a try!
&lt;/p&gt;</content></entry><entry><title>TempEL, an Emacs package for managing templates</title><id>https://p-snow.org/tempel-an-emacs-package-for-managing-templates.html</id><author><name>p-snow</name></author><updated>2023-11-21T00:00:00Z</updated><link href="https://p-snow.org/tempel-an-emacs-package-for-managing-templates.html" rel="alternate" /><content type="html">&lt;p&gt;
&lt;a href=&quot;https://github.com/joaotavora/yasnippet#start-of-content&quot;&gt;YASnippet&lt;/a&gt; had been my go-to package until I came across &lt;a href=&quot;https://www.reddit.com/r/emacs/comments/yuyqqj/can_tempel_replace_yasnippet/&quot;&gt;this thread&lt;/a&gt;. Now I'm excited about yet another Emacs template system named &amp;quot;&lt;a href=&quot;https://github.com/minad/tempel&quot;&gt;TempEL&lt;/a&gt;&amp;quot;. YASnippet is undoubtedly a great package for handling snippets formatted like in TextMate. The only drawback I often encounter is that the package manages each snippet in a separate file, and acquiring the snippet format can be slightly challenging. TempEL addressed this concern with the 'tempo' format, which has been around in Emacs for decades.
&lt;/p&gt;&lt;p&gt;
The following two templates are used to create the same skeleton for a blog post in Org-mode, using YASnippet and TempEL as the respective tools.
&lt;/p&gt;&lt;p&gt;
&lt;details&gt;&lt;summary&gt;YASnippet&lt;/summary&gt;&lt;p&gt;
&lt;/p&gt;
&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-text&quot;&gt;# -*- mode: snippet -*-
# name: blog-post
# key: blog
# --
* ${1:blog_title}
SCHEDULED: ${2:`(format-time-string &amp;quot;&amp;lt;%Y-%m-%d %a&amp;gt;&amp;quot;)`}
:PROPERTIES:
:EXPORT_FILE_NAME: ${3:`(format-time-string &amp;quot;%Y%m%d_%H%M&amp;quot;)`}
:END:
${0:`(org-expiry-insert-created)`}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;&lt;/details&gt;
&lt;/p&gt;&lt;p&gt;
&lt;details&gt;&lt;summary&gt;TempEL&lt;/summary&gt;&lt;p&gt;
&lt;/p&gt;
&lt;div class=&quot;org-src-container&quot;&gt;
&lt;pre class=&quot;src src-emacs-lisp&quot;&gt;(blog &amp;amp; (org-insert-heading-after-current)
      (p &amp;quot;blog title: &amp;quot; title t) (insert title)
      (prog1 nil (org-schedule nil (current-time)))
      (org-entry-put (point) &amp;quot;EXPORT_FILE_NAME&amp;quot; (format-time-string &amp;quot;%Y%m%d_%H%M&amp;quot;)))
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;&lt;/details&gt;
&lt;/p&gt;&lt;p&gt;
As you can see, the TempEL format allows you to write templates in full Lisp data code, whereas YASnippet's format permits the use of Lisp code to a limited extent, as long as the code does not directly manipulate buffer contents. That's the point I'd like to recommend TempEL to Lispers and Emacs enthusiasts. You can see &lt;a href=&quot;https://github.com/p-snow/config/blob/main/dotfiles.org#my-tempel-templates-in-modes&quot;&gt;my TempEL templates&lt;/a&gt; being incorporated into &lt;a href=&quot;https://www.p-snow.org/config/dotfiles.html&quot;&gt;my configuration collection&lt;/a&gt;.
&lt;/p&gt;</content></entry></feed>