Org-remark v1.3 Line Highlight

Org-remark is an Emacs package I have been developing. It lets you highlight and annotate text files, websites, EPUB books and Info documentation with using Org mode.

Line Highlight

With version 1.3, you can highlight a whole line. It is a new type of highlights, which adds a mark on the margin of the buffer. See the screen image below.

Text of Alice with range-highlights and line-highlights

The yellow and blue asterisks “*” on the left margin indicate that the respective lines have a line highlight. The second line highlight is surrounded by parentheses. This indicates that it has some marginal notes written for the line. You can customize these marks to be an icon instead of the default asterisk and parentheses..

How to Highlight a Line

To highlight a line, use the default highlighter pen interactive function: org-remark-mark-line. Place your cursor on the line of text you wish to highlight and call it (e.g. M-x org-remark-mark-line). That’s it. You do not need to specify a range.

The rest works in the same way as the range-highlight. You can open/view the notes by placing your cursor anywhere on the line and call org-remark-open/view. You can use org-remark-next/prev to navigate through highlights for both range- and line-highlights. Org-remark treats both types of highlights in the same way.

Custom Line-Highlighter Pen

You can also create your own highlighter pen functions with different colors for line highlights. The tool you use to do so is the same as before: org-remark-create. See some examples below.

;; Default line-highlighter function.
(org-remark-create "line"
                   '(org-remark-type line))

;; The blue highlight is a custom line-highlighter created by the following.
(org-remark-create "line-alt"
                   '(org-remark-type line))

The important part is the last argument '(org-remark-type line) passed to org-remark-create. This argument is a property list, which consists of property-value pairs. In these examples above, I am passing one pair: property org-remark-type and value line. This creates a new line-highlighter pen interactive function, instead of a range-highlighter one.

Showing Highlight Marks on Right Margin

You can customize the highlight marks to be displayed on the right margin with the user option org-remark-line-margin-side. The result looks like this in the screenshot below. It also shows an SVG icon for highlight marks instead of the default asterisk.

Highlight marks on the right margin

Customizing is easy; like so.

;; default is left-margin
(setopt org-remark-line-margin-side 'right-margin)

Customizing org-remark-line-margin-side

This is the main user option. There are other minor ones, which you can find with M-x customize-group. Look for org-remark-line.