TGViewer
/r/emacs /r/emacs @r_emacs · 80 subscribers
Post #28674 10
tip: generating number ranges

https://sachachua.com/blog/2026/10/emacs-lisp-parse-page-ranges-insert-issue-references/ mentions a way to expand string ranges into e.g. #47, #48, #49, #50, #51, #52, #53, #54 and comes up with a function for that.

But there is already a library that does this and more: https://github.com/abo-abo/tiny

For this exact example, you'd type m47, 54|#%d and hit C-; (if you bound that to tiny-expand) and you'd get "#47, #48, #49, #50, #51, #52, #53, #54".

The syntax is m followed by your range, and optionally a format string after a |. So if you didn't need the # before each number it becomes even simpler: m47, 54. Or you can change the separator: m1;3 becomes "1;2;3".

You can even put in lisp expressions in there and drop the parentheses, it's extremely powerful.

https://redd.it/1wywgif
@r_emacs
More from @r_emacs
  1. Oct 6, 2026Bringing micro-timers, checklist budgeting, and monotasking focus to Org-mode (org-focus-h…
  2. Oct 6, 2026Getting emacs to cohabitate with termux /r/termux/comments/1wzax8p/getting_emacs_to_cohabi…
  3. Oct 6, 2026A problem with tabs auto alignment https://redd.it/1wz8rbl @r_emacs
  4. Oct 6, 2026discussion Guidelines/best practices for /quality/ agent-assisted development? I'd like to…
  5. Oct 6, 2026Configuring the Emacs UI for Better Latency and Perceived Responsiveness https://www.james…
  6. Oct 6, 2026Travelling agenda For those who like to use org-agenda, how do you take it with you when y…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →