From: Leo Vivier <leo.vivier+dev@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-element.el: Fix properties being upcased by parser
Date: Mon, 08 Jun 2020 12:32:12 +0200 [thread overview]
Message-ID: <87h7vl3l1v.fsf@hidden> (raw)
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
Hi there,
I’ve noticed that `org-element-parser` upcases the keywords, even though
the standard established in 13424336a6f30c50952d291e7a82906c1210daf0 is
to ‘Prefer lower case letters for blocks and keywords’.
I’ve changed it to `downcase` to maintain consistency. This might cause
problems with some hard-coded upper case letters in the codebase, but
I haven’t run into any issue so far.
HTH,
--
Leo Vivier
[-- Attachment #2: 0001-org-element.el-Fix-properties-being-upcased-by-parse.patch --]
[-- Type: text/x-patch, Size: 1309 bytes --]
From 574549a1ab07fd1500111a25d3f1caec4aa40bfb Mon Sep 17 00:00:00 2001
From: Leo Vivier <leo.vivier+dev@gmail.com>
Date: Mon, 8 Jun 2020 12:14:55 +0200
Subject: [PATCH] org-element.el: Fix properties being upcased by parser
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* org-element.el (org-element-keyword-parser): Downcase properties
instead of upcasing them.
This is to follow the standard established by
13424336a6f30c50952d291e7a82906c1210daf0 to ‘Prefer lower case letters
for blocks and keywords’.
TINY CHANGE
---
lisp/org-element.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index ac41b7650..e73b37b2b 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -2184,7 +2184,7 @@ containing `:key', `:value', `:begin', `:end', `:post-blank' and
(let ((begin (or (car affiliated) (point)))
(post-affiliated (point))
(key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):")
- (upcase (match-string-no-properties 1))))
+ (downcase (match-string-no-properties 1))))
(value (org-trim (buffer-substring-no-properties
(match-end 0) (point-at-eol))))
(pos-before-blank (progn (forward-line) (point)))
--
2.26.2
next reply other threads:[~2020-06-08 10:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 10:32 Leo Vivier [this message]
2020-06-08 11:59 ` [PATCH] org-element.el: Fix properties being upcased by parser Nicolas Goaziou
2020-06-08 12:14 ` Leo Vivier
2020-06-08 19:43 ` Nicolas Goaziou
2020-06-08 19:46 ` Leo Vivier
2020-06-08 20:36 ` Nicolas Goaziou
2020-06-12 4:48 ` Leo Vivier
2020-06-13 15:32 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7vl3l1v.fsf@hidden \
--to=leo.vivier+dev@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.