From c0d699e9ba415ced9bf209cec3a4829c0d961eeb Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Thu, 13 Jun 2019 03:18:43 +0300 Subject: [PATCH 1/2] 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 --- lisp/org-mobile.el | 4 ++-- 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 baac7a992..8fdf84ab4 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 fe8e7890f..0161d738f 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 From 64262af685892782983489ab42e13f727be1fe37 Mon Sep 17 00:00:00 2001 From: Ismail S Date: Mon, 8 Jul 2019 22:56:55 +0200 Subject: [PATCH 2/2] Backport commit fb48eb48f from Emacs * lisp/org-capture.el (org-capture-templates): Fix typo in doc string (bug#36491). Fix minor typo in org-capture-templates fb48eb48f3bd432307821bc7158d1090f0e4bbf0 Ismail S Tue Jul 9 00:53:18 2019 +0200 TINYCHANGE --- lisp/org-capture.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 3febf02a9..748cae7b1 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -152,7 +152,7 @@ type The type of entry. Valid types are: first plain list at the target location. checkitem a checkbox item. This differs from the - plain list item only is so far as it uses a + plain list item only in so far as it uses a different default template. table-line a new line in the first table at target location. plain text to be inserted as it is.