For very many reference files, I am rather addicted to the combination of hi-lock
, text-mode
, and the very plain utility of TABs.
Here is a simple example. The file
hi-lock: (("===^^^===" (0 (quote compilation-line-number) t)))
hi-lock: (("http.?://.*" (0 (quote browse-url-button) t)))
===^^^===
===^^^===
Flutter Navigation
Routes and Navigation
Navigator https://api.flutter.dev/flutter/widgets/Navigator-class.html
Named Routes https://docs.flutter.dev/cookbook/navigation/named-routes
===^^^===
etc..
===^^^===
renders as follows.
This works nicely.
.txt
files. There might be a way to nudge it to index other extensions. Still, the commands of any other file formats (as with, notably, LaTeX) will get in the way.But there are also several problems.
hi-lock
header for each file.hi-lock
are dubious. (Why is compilation-line-number
chosen for a separating line?)Does org-mode solve these problems while maintaining the advantages of text-mode
and hi-lock
?
If you're comfortable with ORG, I would particularly like to see how the snippet above can be rendered in an equally—or better—looking way using ORG.
Related:
The spirit of the question is:
The following is a remedy (working) solution, on the path to migrating to org-mode
from a combination of text-mode
and hi-lock
.
Using the following .emacs
file.
(add-to-list 'default-frame-alist '(background-color . "black"))
(add-to-list 'default-frame-alist '(foreground-color . "white"))
(set-frame-font "-*-*-medium-r-normal--24-*-*-*-*-*-*-*")
(setq org-startup-indented t)
(require 'org-superstar)
(add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))
The following lines
* Flutter Navigation
** Routes and Navigation
- Navigator https://api.flutter.dev/flutter/widgets/Navigator-class.html
- Named Routes https://docs.flutter.dev/cookbook/navigation/named-routes
* etc..
render as follows.
Though this addresses neither the separating lines nor the tabs.
Separating lines are easy, if they're meant for the output (PDF, etc) rather for the Emacs display itself.