Derek Chen-Becker <[email protected]> writes: > All fixed in the latest patch. Is there an existing pre-commit script hook > that can be used to validate formatting of commit messages? I feel like I'm > going to forget the double-space again at some point. Happy to add one that > folks could (optionally) use.
Not in Org repository, but we can borrow one from Emacs repo. Do you want to prepare a patch for that? (I can do it myself, but want a second pair of eyes to take a look what Emacs does and whether things will work for Org as well) >> Why not using `org-priority-valid-cookie-string-p'? > > I actually started thinking about that, but the difference here is that the > existing `org-priority-regexp' is for a cookie (including the square > brackets, e.g. "[#...]") whereas this match is for the raw value. I was > considering adding a new `defvar' for `org-priority-value-regexp' that I > could use with a new `org-priority-valid-value-string-p' predicate, as well > as constructing `org-priority-regexp', but that felt a little overly > complicated. I guess I could also just format the value read from the user > appropriately and then call `org-priority-valid-cookie-string-p'. I'm open > to suggestions. I think that an additional defvar with regexp will be useful to have. I do not like hard-coding regexps in the code. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
