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: Re: Escaping a string for substitute-command-keys Date: Sat, 5 Oct 2019 00:06:43 -0400 Message-ID: References: <14423aa7-36c3-9ab7-6483-d43624f99e17@gmail.com> <83pnjd7pud.fsf@gnu.org> <83h84p7nih.fsf@gnu.org> <837e5l7j8n.fsf@gnu.org> <83imp461do.fsf@gnu.org> 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="39266"; 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 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 05 06:07:19 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 1iGbLj-000A83-JM for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 06:07:19 +0200 Original-Received: from localhost ([::1]:54198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGbLi-0007kf-FF for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2019 00:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41310) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGbLD-0007kN-1k for emacs-devel@gnu.org; Sat, 05 Oct 2019 00:06:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGbLC-0005tF-24 for emacs-devel@gnu.org; Sat, 05 Oct 2019 00:06:46 -0400 Original-Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]:35852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGbLB-0005t4-V7; Sat, 05 Oct 2019 00:06:46 -0400 Original-Received: by mail-qk1-x731.google.com with SMTP id y189so7804461qkc.3; Fri, 04 Oct 2019 21:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5URjLaEeDOjWLN0lWRGndajOUyHN/WwhcNdkwMQn/n8=; b=aEqPPa6KyCy3UKPC9BZRfFtuRUs+9VYPbDtz05vtUf115lrLximX9FwSAddusFmu8P FtR2orqLqwxonq1KQbtoTurCI0cD+99V5TVsuPuTOFuyGDTDdLcrUcX7Ewn9fD7+x5U5 AbJd3yDT1HioRBazDNNNujuF1Z2essDpK6V/WpIk0PFGvIwVU1RcAJkQISjgELIF3J+t gkI1UmMIdh988mRx8yMxPxpOLwATgXA1JzJcqDPEgl6czhpD+VIm9QQOq+bt2cQDc5p0 eKQTSbQQeC6smX0kk+xk0Cd1TgzdVld/cwAIVK1FnkFsXUR3YQlixsp6U9lJ3CAlfYES gQeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5URjLaEeDOjWLN0lWRGndajOUyHN/WwhcNdkwMQn/n8=; b=PeekGyL4ero7jucwnK9PebmBsR7ajEgT+kZOGj1ofJqcaVMSooABQd59Q3Y0q3eqtk gjtdLByuwJSiXX5JZysyBxROzNHhU7JnoFrUcGttFRKl4H9GN4swKFxYxYe4YxCo16Jn t2Zg5OfsHkWGQYrVreJpwWO6hxzh+gVQcWxdGHc5Ju+ippcVEnmyWCAqzFJgxpDXuOpl sOhpm+2xBlSe/cD8BoeRxo328sefT99gqnLKfvR2I39K5nelsrSf8Rg1iWrVliG0I6lc mNdyIFYLX+hmJZ6iy8K4ks+oUpRU6ib0qecu7g8sIcvLFuOE+QyENW/ClUkXVVw9UOzk /hKQ== X-Gm-Message-State: APjAAAXndaRGdfIy5Nb33ReCtDyCUOmXdOckxN53hdBtX79k8BTCdoEk uQ3wmxr7bMpuz3g/NiXRRWlI+SFf X-Google-Smtp-Source: APXvYqw6uUA2zVFR1akvTHJAD5UPOo35eRQL4x/DnTamYesBeotTcgFYsy3Nvd1B8g2ptd5fW05csA== X-Received: by 2002:a37:4f83:: with SMTP id d125mr13332654qkb.295.1570248405162; Fri, 04 Oct 2019 21:06:45 -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 c126sm4168527qkd.13.2019.10.04.21.06.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 21:06:44 -0700 (PDT) In-Reply-To: <83imp461do.fsf@gnu.org> 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::731 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:240592 Archived-At: On 2019-10-04 10:17, Eli Zaretskii wrote: > help-echo is for displaying documentation, not for displaying > general-purpose text strings. Btw, it was surprising to me to see that very little code in Emacs actually takes advantage of this command-substitution facility in help-echo; most help-echo strings that mention commands actually hardcode the default binding. Also related is the fact that help-echo allows kinds of values: strings or functions. In Flycheck's case (the one I know the best), it would be enough to say that help-echo is only passed through substitute-command-keys if it's a string, but not if it's a function (the reasoning being that it's easy to run the substitution inside the function, if needed). Of course, shr and Flymake would then need to switch to using functions instead of strings, as well. Clément.