From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: don't hard-code keys Date: Sun, 2 May 2021 19:28:12 +0200 Message-ID: References: <877dkirsk3.fsf@zoho.eu> <87k0ohvc7f.fsf@gnu.org> <8735v5ry9p.fsf@zoho.eu> Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20026"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 02 19:29:03 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldFtu-00050K-7Z for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 19:29:02 +0200 Original-Received: from localhost ([::1]:52112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldFtt-00018G-A6 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 02 May 2021 13:29:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldFtM-000189-EP for help-gnu-emacs@gnu.org; Sun, 02 May 2021 13:28:28 -0400 Original-Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]:39560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldFtK-0008AT-0x for help-gnu-emacs@gnu.org; Sun, 02 May 2021 13:28:28 -0400 Original-Received: by mail-yb1-xb36.google.com with SMTP id z1so4604558ybf.6 for ; Sun, 02 May 2021 10:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=6xHjLF1I72Sz5+HZfJeLvVPf4SXTzfDUBzEMdOisDHM=; b=gsGWSp4oXXYKGi65Xu6qZ+PLySz1Hy14H3/7IdeOJgAoKe7K07/nM4geI1Quu68P7K gQL7D6CK1Csrhj0wlm+d8ESx3Kyia+UjhUSHFJ+CQVQxyiLl0zsWndrxVVrh2pENVBZW VKiBitQ03TLjkkqDkFlhOaY/QNm+OGNoF9rcTLzDh4YWTwRNYj1u/+zGq+R2uzX+32cw I+Jjfnh1AIajt3Bsp24lnDtgcrhc7/bPrv8odbKHN9rp1fokAmLUVh/9FxexcvprBAPV MSVOSJeczZq7RUZkdIPwLsZbDQja9QaDJVeFLslnVTemtoKHn452bTTAN1qIUlKheNRx Hm6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=6xHjLF1I72Sz5+HZfJeLvVPf4SXTzfDUBzEMdOisDHM=; b=Jl/INKjtsjRt6bCsN4zx7CMPJ2GuEgGe5Q2F6GoNK4HNb61v6diHtxFntBqimlgWrX WB5T6wnE07Td8n14vaP252qO2I5PN1KYr+DUt+Wz3AVmOdEwFKpdMmWQh1/SMd5QrlKm opUHWLSonai3qChe8i3xiW6alfHjEMf46/48RhIYmHM4Pw/5XcssyXtQH2lKRn5FR5Mp j/kfr35bblj6LiwzGarO9fIAm4AH2lIzofM4xC6rF9bokJDUHz/zm9rrEcsd1pwBLBve T0M2o1FYEkfImS3DQOshrVXgqmJgpTD4ktnI+Aau3mpxrjZLH1nSLCLvoqw3Gia+N8AW irMg== X-Gm-Message-State: AOAM532vQ1c5DwrTWEjauTyhPXc0m0vrOP4tVIKv39ZtYCJ7MwwBnucZ D32GHrzGePPjbmlw4RaOQuGL5vWKk1o8D0fVwxEo3dCalxz33Zq9 X-Google-Smtp-Source: ABdhPJwVtwfPoUnGeE1SVAxedbj93ZQNFmBKciffZCBjmUcILX7RgJyqqQI58XKZOEeIpV/w8BhVRXD/Yj7+fragl1k= X-Received: by 2002:a25:ca85:: with SMTP id a127mr16367833ybg.33.1619976504504; Sun, 02 May 2021 10:28:24 -0700 (PDT) In-Reply-To: <8735v5ry9p.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::b36; envelope-from=thibaut.verron@gmail.com; helo=mail-yb1-xb36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129340 Archived-At: On Sun, 2 May 2021, 16:48 Emanuel Berg via Users list for the GNU Emacs text editor, wrote: > Tassilo Horn wrote: > > >> But the question: how can I avoid hard-coding the C-u key > >> but instead have the keybinding inserted thru a reference > >> to the function, i.e. `universal-argument'? > > > > You mean, in the `message' call? Have a look at > > > > (info "(elisp) Keys in Documentation") > > I have it working in docstrings but not in general, for > example this > > =E2=80=98\[COMMAND]=E2=80=99 > stands for a key sequence that will invoke COMMAND, or =E2=80=98M-= x > COMMAND=E2=80=99 if COMMAND has no key bindings. > > sounds like what I want but > > (substitute-command-keys "\[universal-argument]") > > :( > You need to escape the backslash, otherwise \[ just becomes [ in the string.