emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>, Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas
Date: Thu, 10 Mar 2016 12:47:28 -0500	[thread overview]
Message-ID: <CAFyQvY38Lqk0GTXqEAxaMDkkdvR9b+d+k4Dj1KFbHZkLZpWa8w@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY2j5SUjA-RJRrMMQKA6wWG4+gSgJqMkR5zZ83y66ZUwNA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 2716 bytes --]

  reply	other threads:[~2016-03-10 17:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 16:18 [PATCH] Fix the single quote printed in the message printed by org-table-edit-formulas Kaushal Modi
2016-03-10  9:25 ` Nicolas Goaziou
2016-03-10 15:33   ` Kaushal Modi
2016-03-10 16:05     ` Paul Eggert
2016-03-10 16:00   ` Kyle Meyer
2016-03-10 16:38 ` Kyle Meyer
2016-03-10 16:41   ` Kaushal Modi
2016-03-10 17:47     ` Kaushal Modi [this message]
2016-03-10 18:24       ` Kaushal Modi
2016-03-11  1:39       ` Paul Eggert
2016-03-11  3:22         ` Kaushal Modi
2016-03-11  4:30           ` Kyle Meyer
2016-03-11  4:55             ` Kaushal Modi
2016-03-11  5:12               ` Kyle Meyer
2016-03-11 17:44                 ` Kaushal Modi
2016-03-11 18:47                   ` Kyle Meyer
2016-03-11 19:16                     ` Kyle Meyer
2016-03-12  4:01                     ` Kyle Meyer
2016-03-12  4:57                       ` Kaushal Modi

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY38Lqk0GTXqEAxaMDkkdvR9b+d+k4Dj1KFbHZkLZpWa8w@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).