Here's the updated patch (MINUS the help-echo fix): From 238ccdfc8bbdeb53196392a4dff96478a19cb5a5 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Wed, 9 Mar 2016 01:18:58 -0500 Subject: [PATCH] Fix the single quote printed in the message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Display quotes in key-bindings as straight quotes * lisp/org-agenda.el (org-agenda-show-the-flagging-note): * lisp/org-footnote.el (org-footnote-goto-definition): * lisp/org-table.el (org-table-edit-formulas): Straight quote fix * lisp/org-protocol.el (org-protocol-create-for-org): * lisp/org-table.el (org-table-sum): Minor reformatting Fix the quote style displayed when key-bindings are shown in the echo via (message .. (substitute-command-keys ..)). Starting from emacs 25.1, a straight quote is rendered as a right-curly quote by default. So below will render that single quote as curly. (message "C-c '") The fix is to print that quote verbatim using the "%s" modifier: (message "%s" "C-c '") Below is how this commit changes the message echoed in the org-table-edit-formulas function. Earlier: Edit formulas, finish with ‘C-c C-c’ or ‘C-c ’’. See menu for more commands. After fix: Edit formulas, finish with ‘C-c C-c’ or ‘C-c '’. See menu for more commands. Note the difference in the single quote style in "C-c '". --- lisp/org-agenda.el | 5 +++-- lisp/org-footnote.el | 7 +++---- lisp/org-protocol.el | 2 +- lisp/org-table.el | 11 +++++------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 876ea44..cd69c74 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -10107,8 +10107,9 @@ tag and (if present) the flagging note." (replace-match "\n" t t)) (goto-char (point-min)) (select-window win) - (message (substitute-command-keys "Flagging note pushed to kill ring. \ -Press \\[org-agenda-show-the-flagging-note] again to remove tag and note"))))) + (message "%s" (substitute-command-keys "Flagging note pushed to \ +kill ring. Press \\[org-agenda-show-the-flagging-note] again to remove \ +tag and note"))))) (defun org-agenda-remove-flag (marker) "Remove the FLAGGED tag and any flagging note in the entry." diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index e80685a..a847326 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -531,10 +531,9 @@ value if point was successfully moved." (goto-char (match-end 0)) (org-show-context 'link-search) (when (derived-mode-p 'org-mode) - (message - (substitute-command-keys - "Edit definition and go back with `\\[org-mark-ring-goto]' or, if \ -unique, with `\\[org-ctrl-c-ctrl-c]'."))) + (message "%s" (substitute-command-keys + "Edit definition and go back with \ +`\\[org-mark-ring-goto]' or, if unique, with `\\[org-ctrl-c-ctrl-c]'."))) t)) (defun org-footnote-goto-previous-reference (label) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index a249c9e..6510733 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -669,7 +669,7 @@ delegates most of the work to `org-protocol-create'." (require 'org-publish) (let ((all (or (org-publish-get-project-from-filename buffer-file-name)))) (if all (org-protocol-create (cdr all)) - (message "Not in an org-project. Did mean %s?" + (message "Not in an org-project. Did you mean `%s'?" (substitute-command-keys"\\[org-protocol-create]"))))) (defun org-protocol-create (&optional project-plist) diff --git a/lisp/org-table.el b/lisp/org-table.el index 488c912..0b7d413 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2136,11 +2136,10 @@ If NLAST is a number, only the NLAST fields will actually be summed." s diff) (format "%.0f:%02.0f:%02.0f" h m s)))) (kill-new sres) - (if (org-called-interactively-p 'interactive) - (message "%s" - (substitute-command-keys - (format "Sum of %d items: %-20s (\\[yank] will insert result into buffer)" - (length numbers) sres)))) + (when (org-called-interactively-p 'interactive) + (message "%s" (substitute-command-keys + (format "Sum of %d items: %-20s \ +(\\[yank] will insert result into buffer)" (length numbers) sres)))) sres)))) (defun org-table-get-number-for-summing (s) @@ -3591,7 +3590,7 @@ Parameters get priority." (when (eq org-table-use-standard-references t) (org-table-fedit-toggle-ref-type)) (org-goto-line startline) - (message + (message "%s" (substitute-command-keys "\\\ Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or `\\[org-edit-special]'. \ See menu for more commands."))))) -- 2.6.0.rc0.24.gec371ff