From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Escaping a string for substitute-command-keys Date: Thu, 3 Oct 2019 09:52:31 -0400 Message-ID: <14423aa7-36c3-9ab7-6483-d43624f99e17@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126579"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 03 15:53:22 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iG1Xm-000WoM-Cf for ged-emacs-devel@m.gmane.org; Thu, 03 Oct 2019 15:53:22 +0200 Original-Received: from localhost ([::1]:36454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG1Xl-00069y-8j for ged-emacs-devel@m.gmane.org; Thu, 03 Oct 2019 09:53:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56339) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iG1X2-00063x-Lu for emacs-devel@gnu.org; Thu, 03 Oct 2019 09:52:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iG1X0-0007fy-N3 for emacs-devel@gnu.org; Thu, 03 Oct 2019 09:52:36 -0400 Original-Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:39621) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iG1X0-0007fZ-Ja for emacs-devel@gnu.org; Thu, 03 Oct 2019 09:52:34 -0400 Original-Received: by mail-qk1-x733.google.com with SMTP id 4so2411860qki.6 for ; Thu, 03 Oct 2019 06:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=cs1u6XwAMA+Uf5KPr5XOcCjE9ttvAtOG3wu44q7c39M=; b=ECKYZ90rGIWzAhZqvR4ro6229//pzlRyM/fpJyFBghrr85VIU28PMpn4wQYJtK/2Vx VeugoDYUhkWKJ8/w6ScB6Jx4UqOnPWnfkOqf3lK+P9LY3tnpeuOT+onJ6nIb0EJlB7wJ ftrxw2f/geXF5+6p9G1kd5dicNGkPQN961suAyPB3+XersF06DAH0I9q38QxuOaVtaLU gHRG2dcogA8ZW3zhmADMv/rkDTPybRE7HsKyPKs0HDWmWXAuyJBFg1eDXaIcif64Um51 ZzM5MNsmF0aagchE+7umZ7RFswFfj9pM02EnNW2rmUt4vrCIp8MYf3Vg4Xva7aQ5UeZA PYxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=cs1u6XwAMA+Uf5KPr5XOcCjE9ttvAtOG3wu44q7c39M=; b=sLx1HyFOicj9SFSbJnVyFoCJjUMqi8hm6mhU4DLhptG2GjvLuizU8jcYNFK3Kcd2Em k/xmFopkXKj/izyIxqQCB03zxLt71h6SUfdZUp4/wm+EHe47sZcWba1LNVGIaL5ojq0O +foUSQqNE0xxDDK6p/V0Cok1i7pkJPzWOxq7jdrQ4yG7o5s4V9aNPhrltkrPjzutb1Km /R7xkOOV8unE9QZVCXzrBU1EWQKTlzBS+hP4Fl4sn23aSkSmNA1TcA73IaftHCbkU0y5 dyk7bsynucCa8POjmIVHp1TX0PUfEtjXHDly/CwSm1QScAeib1rSZSooV42xDtr/+h9M j8KA== X-Gm-Message-State: APjAAAVxvr6iufnXQx2HdygjUOeAXSQok91HEdrqjQtFvF7/EU+NrEIW 5krYkVqxR/Z2GnMU08XW+L/B/4YB X-Google-Smtp-Source: APXvYqwdHuIYbRmomODSB0JvL8kEPjxNegVpa91i+UySGpIDhFReb7zD+Nez+hnFgbqCntEPw9vxZg== X-Received: by 2002:a37:9e0a:: with SMTP id h10mr4415657qke.128.1570110753029; Thu, 03 Oct 2019 06:52:33 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:656c:d996:de5:9bda? ([2601:184:4180:66e7:656c:d996:de5:9bda]) by smtp.googlemail.com with ESMTPSA id u27sm2061947qta.90.2019.10.03.06.52.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Oct 2019 06:52:32 -0700 (PDT) Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::733 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240507 Archived-At: Hi emacs-devel, I think I've seen a thread about this in the past, but I can't find it. What's the expected way to escape a string before its fed to substitute-command-keys, so that substitute-command-keys reconstructs the original string? The reason for this question is that since 2015 Emacs has been calling substitute-command-keys on help-echo messages, which breaks flycheck and flymake (a simple way to reproduce the issue is to enable flymake in a Python buffer containing just xxx and to hover over the xxx with the mouse: Emacs shows a tooltip containing "Undefined name ’xxx’"). So, what's the right way to escape a string to be fed to substitute-command-keys? Alternatively, is there be a way to disable the transformation for a particular help-echo string, rather than forcing an unnecessary rountrip? Maybe we could add a text property, so that if a string is tagged with a 'text-quoting-style property that style is used instead of the default one? Thanks! Clément.