Skip to content

pdxmph/log2file.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

log2file β€” Format-aware log capture for Emacs

log2file πŸ“

A lightweight Emacs utility for quickly capturing timestamped entries into either Org or Markdown files β€” complete with transient capture windows and file-format-aware heading styles.

Features

  • Logs to either Org or Markdown format based on file extension
  • Captures in a transient split window, sort of like Org Capture
  • Expects/enforces:
    • `#+TITLE:` for Org files
    • `# Title` for Markdown files
  • Minimal by design: just timestamp, title, and your content
  • Use log2file-add-current-file to add a file as a target.

Install

Place log2file.el somewhere in your Emacs load path, then:

(use-package log2file
  :load-path "~/path/to/log2file/"
  :commands (log2file log2file-add-current-file log2file-remove-current-file)
  :init
  (setq log2file-targets '("~/logs/dev.org" "~/logs/notes.md")))

Alternatively, use a directory:

(setq log2file-dir "~/logs/")

Usage

Start a capture session:

M-x log2file

Add or remove the current file from capture targets:

  • M-x log2file-add-current-file
  • M-x log2file-remove-current-file

Finalize with C-c C-c or abort with C-c C-k.

Example Output

Org mode

#+TITLE: dev

* [2025-04-21 Mon 21:00] Refactored logging
Took the old md-capture and made it format-aware.

Markdown

# notes

## [2025-04-21 Mon 21:01] Idea
Thinking about a unified log system for plain text files.

β€”

License

MIT Β© Mike

About

Add log entries to Markdown or org mode files in a quick little popup window.

Resources

License

Stars

Watchers

Forks

Packages

No packages published