drlkf <[email protected]> writes: > I submitted a patch a few years ago about the same change which I could > not follow-up on because I've been quite busy, however most of the > refactoring I had done has already been included in some form or another > so this time the feature I'm trying to include is much more > straightforward, although it could still lead to the parsing clashes the > maintainer mentioned in the original thread: > > https://lists.gnu.org/archive/html/emacs-orgmode/2022-10/msg00635.html > > I'm submitting the new patch here, if it's not acceptable to modify this > behavior then I'll provide another one to extract the piece of code I > want to modify so I can override it with advice.
As I mentioned in the response to your earlier patch, we do not intend to officially support syntax customization. We are aiming for an opposite - syntax will be more standardized to simplify Org syntax support outside Emacs. That said, I do not oppose this patch if we limit it to refactoring. > +#+vindex: org-priority-prefix > +#+vindex: org-priority-suffix > +#+vindex: org-priority-regexp > +#+vindex: org-make-priority-regexp > +You can set your own style of priority marker using > +~org-priority-prefix~, ~org-priority-suffix~ and generate the > +appropriate ~org-make-priority-regexp~ for ~org-priority-regexp~: > + > +#+begin_src elisp > +(setq org-priority-prefix "<:" > + org-priority-suffers ">" > + org-priority-regexp (org-make-priority-regexp)) > +#+end_src > + > +: *** TODO <:1> Customize priority marker This should be dropped. > +(defvar org-priority-prefix "[#" > + "Marker preceding value in the priority indicator e.g [# in [#A].") > + > +(defvar org-priority-suffix "]" > + "Marker following value in the priority indicator e.g ] in [#A].") These should be two defconsts. > + ;; Test all valid numbers with customized markers > + (should > + (let* ((org-priority-prefix "_") > + (org-priority-suffix "|") > + (org-priority-regexp (org-make-priority-regexp))) > + (seq-every-p (lambda (p) > + (let ((cookie (format "_%d|" p))) > + (org-priority-valid-cookie-string-p cookie))) > + (number-sequence 0 64)))) This should be dropped. And please add a commit message, following https://orgmode.org/worg/org-contribute.html#commit-messages -- 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>
