Add use-package instructions to the README#8
Add use-package instructions to the README#8kaorahi merged 1 commit intokaorahi:masterfrom jabirali:master
Conversation
|
I fully agree with your points, and I believe "copy-pastability" is indeed critical for easy trials. I really appreciate your contribution to the modernization of this project. By the way, what do you think about swapping the order of org-mode and markdown-mode? The latter combination seems like a more natural choice for new users these days, from my perspective. |
I’m happy I could contribute something back :)
I completely agree, that sounds like a good idea! By the way, I also just noticed that I forgot the |
|
I think your suggestion looks great – both the code and the english :). I tested both versions now – starting from an empty I have two minor suggestions for improvements:
So perhaps then we could then revise the Markdown-mode version to (removed (use-package howm
:ensure t
:init
;; Where to store the files?
(setq howm-directory "~/Documents/Howm")
(setq howm-home-directory howm-directory)
;; What format to use for the files?
(setq howm-file-name-format "%Y-%m-%d-%H%M%S.md")
(setq howm-view-title-header "#"))And the Org-mode version to (removed (use-package howm
:ensure t
:init
;; Where to store the files?
(setq howm-directory "~/Documents/Howm")
(setq howm-home-directory howm-directory)
;; What format to use for the files?
(setq howm-file-name-format "%Y-%m-%d-%H%M%S.org")
(setq howm-view-title-header "*")
(setq howm-dtime-format "<%Y-%m-%d %a %H:%M>")
;; Avoid conflicts with Org-mode by changing Howm's prefix from "C-c ,".
(setq howm-prefix (kbd "C-c ;"))
:bind*
;; Conveniently open the Howm menu with "C-c ; ;".
("C-c ; ;" . howm-menu))What do you think? |
|
I am sorry for interrupting, but setting howm's txt file extensions to .md
or .org is wrong.
I think that, because with Emacs you can set markdown or org major mode for
a file using prop-line.
This way, you can keep both markdown, org and plain text notes in one howm
directory.
…On Sat, 7 Sept 2024, 12:49 Jabir Ali Ouassou, ***@***.***> wrote:
I think your suggestion looks great – both the code and the english :). I
tested both versions now – starting from an empty init.el – and both
versions work well. It's a good idea to remap the Org-mode prefix in the
example to prevent conflicts.
I have two minor suggestions for improvements:
-
The use-package macro has a keyword :bind, where :bind ("a" . b) is
equivalent to (define-key global-map (kbd "a") 'b). This could perhaps
be used to make the Org-mode version more compact.
-
In my original PR, I added :after org and :after markdown-mode. The
original reason was that I wanted to reuse the org-timestamp-formats
variable to define the Howm timestamp, and this is not defined until Org
has been loaded, and then I just did the same for the Markdown example in
case people want to reuse something from there. But thinking about it now,
this might be a bad idea: If people lazy-load either Org-mode or
Markdown-mode, so that Emacs starts up faster by only loading those modes
when you open the first *.md or *.org file, then Howm might not get
loaded at all. It might therefore be safer to hardcode the timestamp format
and remove those :after keywords to avoid surprises.
So perhaps then we could then revise the Markdown-mode version to (removed
:after keyword):
(use-package howm
:ensure t
:init
;; Where to store the files?
(setq howm-directory "~/Documents/Howm")
(setq howm-home-directory howm-directory)
;; What format to use for the files?
(setq howm-file-name-format "%Y-%m-%d-%H%M%S.md")
(setq howm-view-title-header "#"))
And the Org-mode version to (removed :after keyword, added :bind keyword):
(use-package howm
:ensure t
:init
;; Where to store the files?
(setq howm-directory "~/Documents/Howm")
(setq howm-home-directory howm-directory)
;; What format to use for the files?
(setq howm-file-name-format "%Y-%m-%d-%H%M%S.org")
(setq howm-view-title-header "*")
(setq howm-dtime-format "<%Y-%m-%d %a %H:%M>")
;; Avoid conflicts with Org-mode by changing Howm's prefix from "C-c ,".
(setq howm-prefix (kbd "C-c ;"))
:bind
;; Conveniently open the Howm menu with "C-c ; ;".
("C-c ; ;" . howm-menu))
What do you think?
—
Reply to this email directly, view it on GitHub
<#8 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AU4YQFYNKE5IDUD223FWT2LZVLD4PAVCNFSM6AAAAABNYYJ7C6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZVGEZTKOJWGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
@artsi0m: I think that's an interesting approach as well, but in my opinion having the file extension reflect the file contents is also a useful convention. For instance, if you keep the notes using a Markdown extension, then you can easily email a note to a colleague if needed and it will open correctly in their editor of choice. Or you can feed the note to an export tool like Quarto or Pandoc, and it understands how to parse it without further instruction. |
|
If so, then maybe we should write some export routines, that would rename extension from txt to md, when exporting ? I just really appreciate the markup agnostic aspect of howm. |
|
@artsi0m Thanks for sharing a new idea. I think you are referring to something like I still believe this quick-start code is useful since it offers easy solutions for typical requests by new users. From what I've seen, it's rare to use multiple formats in one howm directory, and howm is not optimized for such cases. The key part of this quick-start code is setting "Major-mode free" is a core part of howm's identity, and I'll absolutely keep it. However, I would recommend sticking to a single format for all notes, at least for beginners. |
|
@jabirali I usually add 'thx' lines to Changelog etc. with contributors' names and emails. Is it okay if I copy your full name and email from the commit log? If you'd prefer not, I can use your github ID instead, for example. |
|
@kaorahi Sure, I'd be happy to be mentioned by name and email :) |
You understand it perfectly.
I know about it, because I started using howm with org mode and needed to set it via use-package. I can put it in issue I already opened. |
|
Oh, sorry. I realize you know about it already. There will be three cases.
As this is a quick start guide, I assume we're focusing on Alice here. In this case, is the current guide ok? Do Bob and Carol need different settings? Ideally, we'd have advanced documentation covering various tips, including #7, but I'm too lazy... |
|
I agree that it's perhaps best to focus on Alice in the quickstart guide :). People like Bob and Carol likely start out like Alice, but become more invested in Howm after giving it a try – at which point they will be more motivated to read other documentation with more detailed instructions and suggestions? (For instance, I personally found the tutorial by Andrei Sukhovskii to be very helpful.) Regarding if they need different settings: I think Bob might want to set I guess Carol's case is more complex? Is she planning to stop using Org as a format altogether, but she wants to keep her notes instead of starting from a new clean For more advanced configuration ideas beyond Alice's needs: Perhaps one possibility might be to create a Github Wiki for this repo? That way, various users could contribute more advanced examples of how to configure and use Howm to the repository. Letting part of the documentation arise as a self-organizing wiki might perhaps be fitting for Howm ;). |
|
Thanks to @shrysr, tips have already been written on the EmacsWiki page, so we can use that for further tip collection, including #7, org-mode know-hows, and more. |
|
Great! I agree, EmacsWiki is a good place for listing such tips & tricks :) |
First, thanks for creating Howm-mode; I only discovered it recently but find that it fits my note-taking needs very well :).
These days, I think most new users install and configure the package indirectly via
use-package(which is now part of Emacs core). Moreover, I think many users who come from other systems want to use it with either Org-mode or Markdown-mode instead of text-mode.I therefore think it might be useful to add a "quick start" section to the README, with copy-paste'able instructions for how to install and set up Howm in these common scenarios. This pull requests adds a suggestion for such instructions.