reddit / emacs

Flagging words and phrases in Emacs

[deleted] · 2022-03-22 07:42
[deleted]
ideasman_42 · 2022-03-22 09:02
Try [hl-prog-extra](https://gitlab.com/ideasman42/emacs-hl-prog-extra) package, it was written for this purpose.
[deleted] · 2022-03-22 10:08
[deleted]
ideasman_42 · 2022-03-22 10:49
That's strange, I use this regularly and never saw that message. - What version of emacs are you using? - Is this a warning or an error? If I can find a way to report this message I can probably resolve fairly easily.
[deleted] · 2022-03-22 11:46
[deleted]
ideasman_42 · 2022-03-22 13:29
For some reason org-mode only works with pre-defined faces (quite strange as these work elsewhere). This works for me: (defface my-org-face '((t (:background "#006000" :foreground "#FFFFFF"))) "My Org Face" :group 'basic-faces) (add-hook 'org-mode-hook (lambda () (setq-local hl-prog-extra-list (list '("\\<\\(town\\|city\\|forgot\\|victim\\|crime\\)\\>" 1 (nil comment string) my-org-face))) (hl-prog-extra-mode)))
[deleted] · 2022-03-22 13:52
[deleted]
nv-elisp · 2022-03-22 15:36
I believe writegood-mode supports your use case.
ideasman_42 · 2022-03-23 00:15
Let me know if this works, I may have to document this problem if it can't be resolved on my side.
[deleted] · 2022-03-23 01:24
[deleted]
[deleted] · 2022-03-23 01:25
[deleted]
ideasman_42 · 2022-03-23 03:39
This is a [fully self contained config](https://bitbucket.org/ideasman42/workspace/snippets/gBRBxz) made by making minor changes to [emacs-for-vimmers](https://github.com/ideasman42/emacs-for-vimmers) that works in my tests. Check `CUSTOM-HIGHLIGHT: BEGIN/END` blocks.
[deleted] · 2022-03-23 06:17
[deleted]
[deleted] · 2022-03-23 15:30
[deleted]
ideasman_42 · 2022-03-24 00:19
Fixed - this issue only happened in Emacs 27 (I was running master).
ideasman_42 · 2022-03-24 00:20
Try again, I've committed a fix that should work in Emacs 27.x.
[deleted] · 2022-03-24 07:25
[deleted]
[deleted] · 2022-03-25 09:20
[deleted]
ideasman_42 · 2022-03-25 10:47
This works here: '("[[:blank:]][[:blank:]]" 0 comment '(:background "#006000" :foreground "#FFFFFF")) '("-[[:upper:]][[:alpha:]]*" 0 comment '(:background "#006060" :foreground "#FFFFFF"))
[deleted] · 2022-03-25 12:58
[deleted]
[deleted] · 2022-03-25 14:26
[deleted]
b3n · 2022-03-26 03:29
Have you tried Emacs' built in highlighting features? (highlight-phrase "your phrase" 'underline) https://www.gnu.org/software/emacs/manual/html_node/emacs/Highlight-Interactively.html
[deleted] · 2022-03-26 04:16
[deleted]