Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kaushal Modi
Thanks.

--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kyle Meyer
Kyle Meyer  writes:

> Kaushal Modi  writes:
>
>> Patch (after rebasing to 5a735b0) attached. I hope it works.

[...]

> I'll have another look at the changes tonight and will push it then
> unless there are more comments from me or others.

Pushed in ebacca39b, with a small change to protect an open parentheses
that at the start of a message line.

-- 
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kyle Meyer
Kyle Meyer  writes:

> Since in this case the branch only consists of one commit, you could
> also just make a new branch off of maint and cherry pick the commit from
> the original branch.

This was a misleading way for me to describe this.  git cherry-pick has
accepted a range of commits since v1.7.2, so ignore the "one commit"
part.

-- 
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kyle Meyer
Kaushal Modi  writes:

> Patch (after rebasing to 5a735b0) attached. I hope it works.

Thanks.  It almost works :)

Applying the patch fails because there's a whitespace change in one of
the context lines (the first one above the org-table-align change).  You
should be able to see the same failure on your end if you make a test
branch off of maint and then try to apply your patch.  But the patch
applies fine with the --ignore-whitespace flag to git am, so there is no
need to resend it.

I'll have another look at the changes tonight and will push it then
unless there are more comments from me or others.

> Git newbie question:
>
> Making the changes in the maint version of these 4 files manually was a bit
> of a pain. What's the right way of porting changes from one branch to
> another?

You can rebase the patch branch from master to maint.  From Magit, you
can use the magit-rebase-subset command ("rs").  From the command line,
you could do something like

git rebase --onto maint master 

Since in this case the branch only consists of one commit, you could
also just make a new branch off of maint and cherry pick the commit from
the original branch.

In either case, Git will let you know if there are any conflicts you
need to resolve.

> I am curious how the changes will be ported from the maint branch
> to the master branch.

I'll merge maint into master.

--
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-11 Thread Kaushal Modi
Patch (after rebasing to 5a735b0) attached. I hope it works.

Git newbie question:

Making the changes in the maint version of these 4 files manually was a bit
of a pain. What's the right way of porting changes from one branch to
another? I am curious how the changes will be ported from the maint branch
to the master branch. What git command should I be looking at to do this in
future? (because I always use the master branch and if I need to submit a
patch in future, I would need to switch to maint branch and port changes
from my master.

Thanks.

--
Kaushal Modi

On Fri, Mar 11, 2016 at 12:12 AM, Kyle Meyer  wrote:

> Kaushal Modi  writes:
>
> > About the patch not merging, I am surprised why that happened because I
> > first rebased to
> >
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e69e18dd71bdf0c9bae9546bf026a1123b9a8c53
> > and then created the patch. I redo the steps using git send-email
> tomorrow
> > and understand the difference.
>
> Please make the patch against the maint branch (currently 5a735b0b8)
> rather than master.  Also, you don't need to bother configuring git
> send-email; an attachment with the output of git format-patch is OK too.
>
> > About the org-contribute page, it is pointing to a different version of
> > emacs CONTRIBUTE, different from the one on emacs-25 branch (
> > http://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE ). Can you
> > please review that?
>
> Thanks for pointing that out.  I'll update the link.
>
> --
> Kyle
>


0001-Display-quotes-in-key-bindings-as-straight-quotes.patch
Description: Binary data


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kyle Meyer
Kaushal Modi  writes:

> About the patch not merging, I am surprised why that happened because I
> first rebased to
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e69e18dd71bdf0c9bae9546bf026a1123b9a8c53
> and then created the patch. I redo the steps using git send-email tomorrow
> and understand the difference.

Please make the patch against the maint branch (currently 5a735b0b8)
rather than master.  Also, you don't need to bother configuring git
send-email; an attachment with the output of git format-patch is OK too.

> About the org-contribute page, it is pointing to a different version of
> emacs CONTRIBUTE, different from the one on emacs-25 branch (
> http://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE ). Can you
> please review that?

Thanks for pointing that out.  I'll update the link.

-- 
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
I'll try to provide a working patch tomorrow. Yes, my FSF copyright
assignment is on file.

About the periods after commit descriptions, I will ensure that all
sentences other than the summary line end with a period.

About the patch not merging, I am surprised why that happened because I
first rebased to
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e69e18dd71bdf0c9bae9546bf026a1123b9a8c53
and then created the patch. I redo the steps using git send-email tomorrow
and understand the difference.

About the org-contribute page, it is pointing to a different version of
emacs CONTRIBUTE, different from the one on emacs-25 branch (
http://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE ). Can you
please review that?

Thanks.

--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kyle Meyer
Kaushal Modi  writes:

> Below is now the latest patch = previous patch + help-echo straight quote
> fix.

Thanks for expanding this to the other cases.  I'm not having any luck
getting this to apply to maint.  Could you send it either as an
attachment or directly with git send-email?

> From a897b6e37708cd836ea9576b43006075af80e062 Mon Sep 17 00:00:00 2001
> From: Kaushal Modi 
> Date: Thu, 10 Mar 2016 22:12:44 -0500
> Subject: [PATCH] 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):
> (org-table-align): Straight quote fix
>
> * lisp/org-protocol.el (org-protocol-create-for-org):
> * lisp/org-table.el (org-table-sum): Minor reformatting

Please end your ChangeLog descriptions with a period.  For the first
one, I'd prefer it as a full sentence.

Based on your commits in the Emacs repo, it seems you've signed
copyright papers.  I'll update
http://orgmode.org/worg/org-contribute.html

--
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
On Thu, Mar 10, 2016 at 8:39 PM, Paul Eggert  wrote:

> Help strings are considered documentation, so you need to escape special
> characters in help-echo property strings the same way you'd escape them in
> doc strings. Something like this:
>
> (let* ((str1 "\nhello")
>(echo-str1 "left single quote (`) right single quote (') grave
> accent (\\=`) apostrophe (\\=') kill-region (\\[kill-region])")
>ov)
>   (let* ((b (+ 1 (point)))
>  (e (+ b (string-width str1
> (insert str1)
> (setq ov (make-overlay b e)))
>   (overlay-put ov 'help-echo echo-str1))
>

Thanks Paul. That was very educational. So it turns out that we do not need
substitute-command-keys at all for help-echo text.

Below is now the latest patch = previous patch + help-echo straight quote
fix.

>From a897b6e37708cd836ea9576b43006075af80e062 Mon Sep 17 00:00:00 2001
From: Kaushal Modi 
Date: Thu, 10 Mar 2016 22:12:44 -0500
Subject: [PATCH] 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):
(org-table-align): Straight quote fix

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting

http://thread.gmane.org/gmane.emacs.orgmode/105594

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 '")

Also an help-echo text property value was fixed in org-table-align.
substitute-command-keys should not be used in that. Instead \\[COMMAND]
should be used directly in the string.
---
 lisp/org-agenda.el   |  5 +++--
 lisp/org-footnote.el |  7 +++
 lisp/org-protocol.el |  2 +-
 lisp/org-table.el| 17 +++--
 4 files changed, 14 insertions(+), 17 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 ( project-plist)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 488c912..df81944 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -795,9 +795,8 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
(org-add-props x nil
  'help-echo
  (concat
-  (substitute-command-keys
-   "Clipped table field, use \\[org-table-edit-field]
to \
-edit.  Full value is:\n")
+ "Clipped table field, use \\[org-table-edit-field] \
+to edit.  Full value is:\n"
   (substring-no-properties x)))
(let ((l (length x))
  (f1 (min fmax
@@ -2136,11 +2135,10 @@ If NLAST is a number, only the NLAST fields will
actually be summed."
s diff)
  (format "%.0f:%02.0f:%02.0f" h m 

Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Paul Eggert

On 03/10/2016 09:47 AM, Kaushal Modi wrote:


How can I make the help-echo property display the ` and ' verbatim, 
without curving them?


Help strings are considered documentation, so you need to escape special 
characters in help-echo property strings the same way you'd escape them 
in doc strings. Something like this:


(let* ((str1 "\nhello")
   (echo-str1 "left single quote (`) right single quote (') grave 
accent (\\=`) apostrophe (\\=') kill-region (\\[kill-region])")

   ov)
  (let* ((b (+ 1 (point)))
 (e (+ b (string-width str1
(insert str1)
(setq ov (make-overlay b e)))
  (overlay-put ov 'help-echo echo-str1))




Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
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 ( 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


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
I am unable to figure out how to escape the ` and ' in the help-echo text
property.

I tried the below:

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 0a25772..749baca 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -794,10 +794,10 @@ When nil, simply write \"#ERROR\" in corrupted
fields.")
  (when (> (org-string-width x) fmax)
(org-add-props x nil
  'help-echo
- (concat
+ (format "%s\n%s"
   (substitute-command-keys
"Clipped table field, use \\[org-table-edit-field]
to \
-edit.  Full value is:\n")
+edit.  Full value is:")
   (substring-no-properties x)))
(let ((l (length x))
  (f1 (min fmax


But that did not help.

Here is a test snippet to show the problem:

(let* ((str1 "\nHi1")
   (str2 "\nHi2")
   (echo-str1 "`without format'")
   (echo-str2 (format "%s" "`with format'"))
   ov)
  (let* ((b (+ 1 (point)))
 (e (+ b (string-width str1
(insert str1)
(setq ov (make-overlay b e)))
  (overlay-put ov 'help-echo echo-str1)
  (let* ((b (+ 1 (point)))
 (e (+ b (string-width str2
(insert str2)
(setq ov (make-overlay b e)))
  (overlay-put ov 'help-echo echo-str2))

How can I make the help-echo property display the ` and ' verbatim, without
curving them?


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
Good point.

I will submit a new patch later today.

On Thursday, March 10, 2016, Kyle Meyer  wrote:

> Kaushal Modi > writes:
>
> [...]
>
> > -  (message
> > +  (message "%s"
> >  (substitute-command-keys "\\\
> >  Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
> > `\\[org-edit-special]'.  \
> >  See menu for more commands.")
>
> There are a few other places in Org that call
> "(message (substitute-command-keys ...))".  I'd prefer this patch to
> take of them all in one go.
>
> --
> Kyle
>


-- 

--
Kaushal Modi


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kyle Meyer
Kaushal Modi  writes:

[...]

> -  (message
> +  (message "%s"
>  (substitute-command-keys "\\\
>  Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
> `\\[org-edit-special]'.  \
>  See menu for more commands.")

There are a few other places in Org that call
"(message (substitute-command-keys ...))".  I'd prefer this patch to
take of them all in one go.

--
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Paul Eggert

On 03/10/2016 07:33 AM, Kaushal Modi wrote:


Shouldn't this be handled by `substitute-command-keys' already?
The fix
looks like a hack.


I don't think this has anything to do with substitute-command-keys. 
That function simply returns a string.


Right, 'message' and 'substitute-command-keys' both turn apostrophe into 
right single quote, so if you really want an apostrophe you need to 
escape it, as Kashal's patch does.


You need to escape the output of substitute-command-keys anyway, in case 
it returns a string containing '%', which 'message' would incorrectly 
interpret as a format specifier.




Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kyle Meyer
Nicolas Goaziou  writes:

>> Fix the quote style when in the "C-c '" key-binding that is printed in the
>> echo via the substitute-command-keys function. In emacs 25.x, a straight
>> quote is rendered as a right-curly quote by default.
>
> Shouldn't this be handled by `substitute-command-keys' already? The fix
> looks like a hack.

message will still try to apply its quoting changes to the output of
substitute-command-keys.

While it does look like a hack, I think it's the easiest way to fix it
and consistent with how it's been handled on Emacs's side (see, e.g.,
Emacs's 6cd2629 and Org's d77a52a).

--
Kyle



Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Kaushal Modi
>
> Shouldn't this be handled by `substitute-command-keys' already? The fix
> looks like a hack.


I don't think this has anything to do with substitute-command-keys. That
function simply returns a string.

So the below 2 forms display the exact same thing: "C-c ’" (note the curved
right quote) by default in emacs 25.0.92:

(with-temp-buffer
  (org-mode)
  (message (substitute-command-keys "\\[org-edit-special]")))

(message "C-c '")

So the way to get the straight quotes printed as they are without getting
converted to curved quotes is by using

(message "%s" STRING)

Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html
@Paul: Please correct me if that's wrong.

Now both of the below forms echo "C-c '" (with straight quote):

(with-temp-buffer
  (org-mode)
  (message "%s" (substitute-command-keys "\\[org-edit-special]")))

(message "%s" "C-c '")


Shouldn't ` and ' also be dropped around \\[command]?


It looks like this convention is used at many other places in org (and many
mores places in emacs elisp source):

org-gnus.el:287:  "Like `\\[gnus]' but doesn't check for new news."
org-id.el:105:  a link to it, using `\\[org-insert-link]' first.
org-footnote.el:536: "Edit definition and go back with
`\\[org-mark-ring-goto]' or, if \
org-footnote.el:537:unique, with `\\[org-ctrl-c-ctrl-c]'.")))
org-footnote.el:903: "\\`\\[fn:\\(.*?\\)\\]" new stored nil nil 1)))
org-lint.el:450:  (and h (org-string-match-p "\\`\\[.*\\]\\'" h)))
org-colview.el:524:  (if (string-match "\\`\\[[ xX-]\\]\\'"
org-src.el:737:   (progn (string-match (if inline "\\`\\[fn:.*?:"
"\\`.*?\\]") c)
ox-beamer.el:210:  ((string-match "\\`\\[<.*>\\]\\'" argument) argument)
ox-beamer.el:213:  ((string-match "\\`\\[\\(.*\\)\\]\\'" argument)
ox-beamer.el:216:  (option (if (string-match "\\`\\[.*\\]\\'" argument)
argument
ox-beamer.el:426:   ((string-match "\\`\\[.*\\]\\'" action )
ox-beamer.el:567: ((string-match "\\`\\[.*\\]\\'" action)
ox-beamer.el:613: (if (string-match "\\`\\[.*\\]\\'" overlay) 'defaction
org-clock.el:104:`\\[org-clock-out]', or until the clock is started in a
different item.
ox-latex.el:2274:(if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
org-table.el:3596:Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
`\\[org-edit-special]'.  \
org-agenda.el:1302:`\\[universal-argument] \\[org-agenda-log-mode]' in
org-agenda.el:1989:\\`\\[org-agenda-filter-by-tag]
RET'.
org-agenda.el:4697:Press `\\[org-agenda-manipulate-query-add]', \
org-agenda.el:4698:`\\[org-agenda-manipulate-query-subtract]' to add/sub
word, \
org-agenda.el:4699:`\\[org-agenda-manipulate-query-add-re]', \
org-agenda.el:4700:`\\[org-agenda-manipulate-query-subtract-re]' to add/sub
regexp, \
org-agenda.el:4701:`\\[universal-argument] \\[org-agenda-redo]' to edit\n"))
org-agenda.el:4897:   "Press `\\[universal-argument] \\[org-agenda-redo]' \
org-agenda.el:7320:So this is just a shortcut for
\\`\\[org-agenda]', available
org.el:868:`\\[org-todo]' and `\\[org-priority]' \
org.el:870:`\\[universal-argument] \\[universal-argument] \\[org-todo]' \
org.el:872:`\\[org-ctrl-c-minus]' to cycle item bullet types,
org.el:1670:When nil, `\\[org-ctrl-c-ctrl-c]' needs to be used \
org.el:1673:`\\[org-toggle-latex-fragment]' to be removed."
org.el:2431:`\\[universal-argument] \\[universal-argument]
\\[universal-argument] \
org.el:2614:with a prefix argument,  i.e. `\\[universal-argument]
\\[org-todo]' \
org.el:2616:`\\[universal-argument] t' in an agenda buffer.
org.el:3093:`\\[org-time-stamp]' or `\\[org-time-stamp-inactive],
org.el:3823:commands `org-search-view' (`\\[org-agenda] s') \

As this was a cosmetic thing, I decided to keep that unchanged. Personally
I also prefer to not have any quotes around the key-bindings. The patch I
submitted merely makes the displayed key-binding less confusing; we have a
straight-quote key on the keyboard, not a curved quote key :)


Re: [O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-10 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> Can someone please review and commit this patch.
>
> It basically prints the "C-c '" binding correctly in the echo area, using
> straight quote instead of curly quote (matters in emacs 25.x). The details
> are in the commit log below.

Thank you for the patch.

> Fix the quote style when in the "C-c '" key-binding that is printed in the
> echo via the substitute-command-keys function. In emacs 25.x, a straight
> quote is rendered as a right-curly quote by default.

Shouldn't this be handled by `substitute-command-keys' already? The fix
looks like a hack.

> -  (message
> +  (message "%s"
>  (substitute-command-keys "\\\
>  Edit formulas, finish with `\\[org-ctrl-c-ctrl-c]' or
> `\\[org-edit-special]'.  \
>  See menu for more commands.")

Shouldn't ` and ' also be dropped around \\[command]?

Regards,

-- 
Nicolas Goaziou



[O] [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas

2016-03-09 Thread Kaushal Modi
Hi all,

Can someone please review and commit this patch.

It basically prints the "C-c '" binding correctly in the echo area, using
straight quote instead of curly quote (matters in emacs 25.x). The details
are in the commit log below.


>From f4411b59d8dc4e5b3df79ccbcd87f6bfe5160776 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

Fix the quote style when in the "C-c '" key-binding that is printed in the
echo via the substitute-command-keys function. In emacs 25.x, 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-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 488c912..0a25772 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3591,7 +3591,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.")



--
Kaushal Modi