Skip to content

masukomi/private-comments-mode

Repository files navigation

private-comments-mode

private-comment-mode is an emacs plugin for Private Comments allowing you to see and manipulate your private comments from within emacs.

images/emacs_demo.gif

A minor mode for “masukomi/private_comments“. https://github.com/masukomi/private_comments Private comments appear as overlays and are not part of the source.

Install

From Melpa

M-x package-install

Then choose private-comments-mode

From GitHub

$ git clone https://github.com/masukomi/private-comments-mode.git
$ cd private-comments-mode
$ make
# in emacs
M-x package-install-file
# then give it the path to the private-comments-mode-<version>.tar file
# in the dist directory

Usage

Toggle private-comments-mode
M-x private-comments-mode

Add or edit a comment

C-c C-r
; or
private-comments-record

Delete the 1st comment above the cursor

C-c C-d
; or
private-commentns-delete

Keymap (C-h b)


Customizing colors

Colors are defined via the private-comments-face. To customize the look, just override its defaults to something that works for you.

Using Emacs’ Easy Customize

The easiest way to customize the look of your private comments is to add a comment, and then run M-x list-faces-display

Search for private-comments-face and select it. Edit the foreground and background colors and click “Apply” to test out new colors. Once you’ve got something you like, click “Apply and Save” to save it for future sessions.

Manual Customization

Choose your favorite foreground and background color combination and add it to your config as follows.

(with-eval-after-load "private-comments-mode"
  (set-face-background 'private-comments-face "#527568")
  (set-face-foreground 'private-comments-face "#FFFFFF"))

Troubleshooting

private-comments-apply: Failed

This error indicates that the file in question has not been committed to git. [The Private Comments system](https://github.com/masukomi/private_comments#readme) uses git commit treeishes to know which comments apply to which versions of a file. As such it can’t work on files that haven’t been committed.

Warning (private-comments): private-comments-apply: Failed
(status 128) git --no-pager ls-files -z --full-name -- my_filename

Developing

  1. hackety hack
  2. launch private comments server
  3. run make test
  4. bump version number according to Semantic Versioning guidelines
  5. run make install to install it locally. Or use any of the many other ways of installing a local package.
  6. ??? to update the README.org file README.in.org acts as a template with info added from the actual code.
  7. run make dist to generate new .tar file in the ./dist directory

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published