-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Howm support #117
Comments
From: Jabir Ali Ouassou ***@***.***>
Date: Wed, 4 Sep 2024 13:58:31 -0700
First of all, thanks for creating the Modus themes :).
You are welcome!
Recently, I've been enjoying using
[Howm](https://github.com/kaorahi/howm). I'm not sure if you're
familiar with it; it's a minor mode for managing a personal wiki in
Emacs, which can be used together with any plaintext filetype (Org,
Markdown, etc.). It has some pretty cool features, like the emphasis
on "self-organization" of notes and the ability to create "comefrom
links" (as opposed to the more traditional "goto links").
Documentation is available
[here](https://github.com/Emacs101/howm-manual).
I have heard about it, but never used it.
Unfortunately, the Modus themes – and most other themes – don't
currently theme the faces defined by Howm, and the defaults are IMO
quite intense. For instance, here is a screenshot of the Howm note
list when viewed using the `modus-operandi-tinted` theme:
<img width="584" alt="Screenshot 2024-09-03 at 16 01 51" src="https://github.com/user-attachments/assets/e35a26f2-1428-4446-85ca-6582dfeeaf84">
Perhaps the Modus themes could alter the faces used for Howm?
In principle, yes. Though the problem here is that I have not used the
package and using it is not trivial work. Do you have a basic setup that
shows all the faces howm defines? I need to check them in context.
…--
Protesilaos Stavrou
https://protesilaos.com
|
Can you please evaluate this and give it a try? (defun my-modus-themes-faces (&rest _)
(modus-themes-with-colors
(custom-set-faces
`(action-lock-face ((,c :inherit button)))
`(howm-mode-keyword-face (( )))
`(howm-mode-ref-face ((,c :inherit link)))
`(howm-mode-title-face ((,c :inherit modus-themes-heading-0)))
`(howm-mode-wiki-face ((,c :inherit link)))
`(howm-reminder-deadline-face ((,c :foreground ,date-deadline)))
`(howm-reminder-late-deadline-face ((,c :inherit bold :foreground ,date-deadline)))
`(howm-reminder-defer-face ((,c :foreground ,date-scheduled)))
`(howm-reminder-scheduled-face ((,c :foreground ,date-scheduled)))
`(howm-reminder-done-face ((,c :foreground ,prose-done)))
`(howm-reminder-todo-face ((,c :foreground ,prose-todo)))
`(howm-reminder-normal-face ((,c :foreground ,date-common)))
`(howm-reminder-today-face ((,c :inherit bold :foreground ,date-common)))
`(howm-reminder-tomorrow-face ((,c :inherit bold :foreground ,date-scheduled)))
`(howm-simulate-todo-mode-line-face ((,c :inherit bold)))
`(howm-view-empty-face (( )))
`(howm-view-hilit-face ((,c :inherit match)))
`(howm-view-name-face ((,c :inherit bold)))
`(iigrep-counts-face1 ((,c :foreground ,rainbow-1)))
`(iigrep-counts-face2 ((,c :foreground ,rainbow-2)))
`(iigrep-counts-face3 ((,c :foreground ,rainbow-3)))
`(iigrep-counts-face4 ((,c :foreground ,rainbow-4)))
`(iigrep-counts-face5 ((,c :foreground ,rainbow-5))))))
(add-hook 'enable-theme-functions #'my-modus-themes-faces) |
From: Jabir Ali Ouassou ***@***.***>
Date: Thu, 5 Sep 2024 03:42:23 -0700
Thanks for the quick response and the code!
You are welcome!
[... 12 lines elided]
Some comments:
- The core features I use now look excellent – it's much more
consistent with the highlighting used in e.g. Org-mode, and the new
colors are much easier on the eyes.
Very well!
- In "comefrom links", there is a "gap" between the `<<<` and the
name. However, `C-u C-x =` reveals that this gap is simply not
fontified by `howm-mode`. I'm not sure if the best course of action is
to keep the current highlighting and report this as an issue upstream
in `howm-mode`, or to use a different `howm-mode-keyword-face` (e.g.
default foreground face without underline like the wikilink brackets).
I am fine either way. Though I think it is worth asking the maintainer
about this.
- It seems the underline below the reminder faces are all shown in
blue rather than matching the text it underlines. (Presumably due to
the order in which `howm-mode` applies faces?) It might be nicer to
either change the underline color to match the text or disable them in
this context.
The underline comes from another face. I do not remember now if it is
'action-lock-face' or 'howm-mode-ref-face'. My problem is that I do not
know all the contexts where those are used.
- I didn't show the "grep" above, but that looks great now.
Good!
…--
Protesilaos Stavrou
https://protesilaos.com
|
This is in response to the question raised by Jabir Ali Ouassou in issue 117: <#117>.
@kaorahi: Above, we have had a discussion about adding support for Howm to the Modus themes, such that consistent colors and faces are used to fontify Howm buffers as are used for e.g. Org-mode and Markdown-mode. Prot has made a nice suggestion above for how to set it up (and added it to the newest version of the docs), see my last post above for some screenshots of how the current version looks. Perhaps you have some input or insights to add, regarding how to best theme Howm-mode? For example, what might be the best way to handle reminder faces, which currently inherit a blue underline from the action-lock face (which are now themed as normal links)? |
Thanks for another modernization! Unfortunately, I'm not really the type of person who cares much about aesthetics, and I don't have enough ability or interest to give useful feedback on this. That said, users would definitely appreciate it if you suggest a better color scheme. It seems we need the following patch to modify the underline style in reminders (not well tested). https://github.com/kaorahi/howm/tree/modus117_underline (setq howm-reminder-action-lock-face nil) ;; use default action-lock face
(setq howm-reminder-action-lock-face '(:underline nil)) ;; no underline
(setq howm-reminder-action-lock-face '(:underline t)) ;; inherit reminder color Personally, I prefer using the action-lock color for all action-lock underlines, even in reminders, but I know my aesthetic sense is broken. :p |
Is To remove the underlines in reminders, how about simply appending `(howm-reminder-deadline-face ((,c :foreground ,date-deadline :underline nil))) If this is enough, we don't need the dirty patch in my previous post. |
@kaorahi: Thanks a lot for chiming in! :) Based on your feedback, I have now updated @protesilaos suggestion as follows:
The revised code is then: (defun my-modus-themes-faces (&rest _)
(modus-themes-with-colors
(custom-set-faces
`(action-lock-face ((,c :inherit button)))
`(howm-menu-key-face ((,c :inherit help-key-binding)))
`(howm-mode-keyword-face (( )))
`(howm-mode-ref-face ((,c :inherit link)))
`(howm-mode-title-face ((,c :inherit modus-themes-heading-0)))
`(howm-mode-wiki-face ((,c :inherit link)))
`(howm-reminder-deadline-face ((,c :foreground ,date-deadline :underline nil)))
`(howm-reminder-late-deadline-face ((,c :inherit bold :foreground ,date-deadline :underline nil)))
`(howm-reminder-defer-face ((,c :foreground ,date-scheduled :underline nil)))
`(howm-reminder-schedule-face ((,c :foreground ,date-scheduled :underline nil)))
`(howm-reminder-done-face ((,c :foreground ,prose-done :underline nil)))
`(howm-reminder-todo-face ((,c :foreground ,prose-todo :underline nil)))
`(howm-reminder-normal-face ((,c :foreground ,date-common :underline nil)))
`(howm-reminder-today-face ((,c :inherit bold :foreground ,date-common :underline nil)))
`(howm-reminder-tomorrow-face ((,c :inherit bold :foreground ,date-scheduled :underline nil)))
`(howm-simulate-todo-mode-line-face ((,c :inherit bold)))
`(howm-view-empty-face (( )))
`(howm-view-hilit-face ((,c :inherit match)))
`(howm-view-name-face ((,c :inherit bold)))
`(iigrep-counts-face1 ((,c :foreground ,rainbow-1)))
`(iigrep-counts-face2 ((,c :foreground ,rainbow-2)))
`(iigrep-counts-face3 ((,c :foreground ,rainbow-3)))
`(iigrep-counts-face4 ((,c :foreground ,rainbow-4)))
`(iigrep-counts-face5 ((,c :foreground ,rainbow-5))))))
(add-hook 'enable-theme-functions #'my-modus-themes-faces) Here are two example screenshots showing that the |
First of all, thanks for creating the Modus themes :).
Recently, I've been enjoying using Howm. I'm not sure if you're familiar with it; it's a minor mode for managing a personal wiki in Emacs, which can be used together with any plaintext filetype (Org, Markdown, etc.). It has some pretty cool features, like the emphasis on "self-organization" of notes and the ability to create "comefrom links" (as opposed to the more traditional "goto links"). Documentation is available here.
Unfortunately, the Modus themes – and most other themes – don't currently theme the faces defined by Howm, and the defaults are IMO quite intense. For instance, here is a screenshot of the Howm note list when viewed using the
modus-operandi-tinted
theme:Perhaps the Modus themes could alter the faces used for Howm?
The text was updated successfully, but these errors were encountered: