diff options
author | Konstantin Kharlamov <Hi-Angel@yandex.ru> | 2019-06-13 03:18:43 +0300 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2019-07-14 11:12:12 -0400 |
commit | c0d699e9ba415ced9bf209cec3a4829c0d961eeb (patch) | |
tree | 588053462ac27d7c4aac68d1ea67d9bbde9945ad | |
parent | 63e851ddbd8573a221343c6fdec7e62109b9f2dc (diff) | |
download | org-mode-c0d699e9ba415ced9bf209cec3a4829c0d961eeb.tar.gz |
Backport commit dfc322d77 from Emacs
* lisp/org-mobile.el (org-mobile-copy-agenda-files)
(org-mobile-update-checksum-for-capture-file):
* lisp/org-table.el (org-table-number-regexp):
Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
(Bug#36167)
Replace manually crafted hex regexes with [:xdigit:]
dfc322d77fd1ce3aa4d852e0ff07bb36944f6432
Konstantin Kharlamov
Sat Jul 6 10:54:25 2019 +0300
-rw-r--r-- | lisp/org-mobile.el | 4 | ||||
-rw-r--r-- | lisp/org-table.el | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index baac7a9..8fdf84a 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -486,7 +486,7 @@ agenda view showing the flagged items." (concat (shell-quote-argument org-mobile-checksum-binary) " " (shell-quote-argument (expand-file-name file))))) - (when (string-match "[a-fA-F0-9]\\{30,40\\}" check) + (when (string-match "[[:xdigit:]]\\{30,40\\}" check) (push (cons link-name (match-string 0 check)) org-mobile-checksum-files)))) @@ -775,7 +775,7 @@ If nothing new has been added, return nil." (buffer (find-file-noselect file))) (when buffer (with-current-buffer buffer - (when (re-search-forward (concat "\\([0-9a-fA-F]\\{30,\\}\\).*?" + (when (re-search-forward (concat "\\([[:xdigit:]]\\{30,\\}\\).*?" (regexp-quote org-mobile-capture-file) "[ \t]*$") nil t) (goto-char (match-beginning 1)) diff --git a/lisp/org-table.el b/lisp/org-table.el index fe8e789..0161d73 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -155,7 +155,7 @@ table, obtained by prompting the user." :type 'string) (defcustom org-table-number-regexp - "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$" + "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$" "Regular expression for recognizing numbers in table columns. If a table column contains mostly numbers, it will be aligned to the right. If not, it will be aligned to the left. @@ -180,9 +180,9 @@ Other options offered by the customize interface are more restrictive." (const :tag "Exponential, Floating point, Integer" "^[-+]?[0-9.]+\\([eEdD][-+0-9]+\\)?$") (const :tag "Very General Number-Like, including hex and Calc radix" - "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") + "^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") (const :tag "Very General Number-Like, including hex and Calc radix, allows comma as decimal mark" - "^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][0-9a-fA-F.]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") + "^\\([<>]?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%]*\\|[<>]?[-+]?0[xX][[:xdigit:].]+\\|[<>]?[-+]?[0-9]+#[0-9a-zA-Z.]+\\|nan\\|[-+u]?inf\\)$") (string :tag "Regexp:"))) (defcustom org-table-number-fraction 0.5 |