From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.help Subject: Re: troubleshoot C-M-/ key binding (dabbrev-completion) Date: Sun, 21 Jan 2024 18:52:20 -0500 Message-ID: References: <87le8izde0.fsf@martinmarshall.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="12093"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, Martin Marshall To: "Michael V. Antosha" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 22 00:53:14 2024 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 1rRhcn-0002ui-RC for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jan 2024 00:53:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRhcD-0001Pw-Sj; Sun, 21 Jan 2024 18:52:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRhcB-0001PW-Pp for help-gnu-emacs@gnu.org; Sun, 21 Jan 2024 18:52:35 -0500 Original-Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRhc9-0004h8-MV for help-gnu-emacs@gnu.org; Sun, 21 Jan 2024 18:52:35 -0500 Original-Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6e0a89b98e4so2064125a34.1 for ; Sun, 21 Jan 2024 15:52:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705881151; x=1706485951; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eMk132C9gs9ukgQ9x71Dr7uQx6tsqlCRJGuujeBwHzM=; b=GrYWKsCcqs2lv27x1kosbOJnCheHUrCrMoZpkh7v//oUWz1+Po3yY0Kz0cXtHGADna XfGL1EGphhjXtGMu3rrCtrYB1qJR455IGs7WiZ1S166vFtWJt/d7fOoGAYW8KZLnoQZz mT9DNOQjdfNEEO24Rvv2uMQFtb1fpTzNCP0wGyQy0lQid/Pgro4snp6QWxidB37xvMmr HadG4WVx5BrNtP8jemoHcB9GsjZCdjwz1Z+/l0cO0aq6bk4RWmFr40HWE8BiAKefPwM5 ZpbpmBk5/d0fJHxwsRJ4JPCDvUvIL5YGIwIZXqROuhiuZvAII7ckNyNugzoaVxzKZK8i w7hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705881151; x=1706485951; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eMk132C9gs9ukgQ9x71Dr7uQx6tsqlCRJGuujeBwHzM=; b=vK9W7rJL8PiNe9cU0hnrJjq/9noRoKiHq9TfDDFoY1ZjQd2I5eiFryljqf9tn/OwQb /lC43y2Ei19fjsTzuyemrCYH3iM4CC3wnMKzvuRl3XARP3AdNQ/kbhpAdOaQJNHExYqW m6/tMbuA/vh008VO9GdlFuMUOY8qbB/w/KkKnRIcE19nrr5TUgGqkTCE33bNGYIzEupS jKzSkxhtqN6i1NG8ibH+WTvoVzJS+5SMowZE0JbIRMg2pj+hzZjCb+ZvoXP/OzFUoeDe Ykdw9g5564rvHtBOuaCuhBW1zdpx4ysJv67KWZ/qVUjcf/oydReere48NTsffvDsTaUJ F7Ew== X-Gm-Message-State: AOJu0Yz5YVTDSmTAMaH4h3FasHiCp44OVdqf05ZM/o4NjSrv0IdmNVRE lOkfE8XmhXIPEF80MYfWVsGXoDMMc2yKd1bH6ZWtnWoLekueuHIUrRVpUOGQuR0KhK9MEyyB9d/ c/YOKA6YvTKxabpAVg5DvVkhYcUo= X-Google-Smtp-Source: AGHT+IGWTruGyDYnRBuIjeRqGhQcTFm9S8XtAlIi68PM/+Oq3XCQyskPl8It9r6GRZ44HFWuAp4MluPWBUhrowg6Xl4= X-Received: by 2002:a05:6830:109a:b0:6e0:bc87:4fd7 with SMTP id y26-20020a056830109a00b006e0bc874fd7mr2190084oto.73.1705881151231; Sun, 21 Jan 2024 15:52:31 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::336; envelope-from=prouleau001@gmail.com; helo=mail-ot1-x336.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145773 Archived-At: Hi Michael, Are you using Emacs in terminal mode? If you are, it's quite possible that any key sequence that does not map to ASCII Control characters will not work. Note that C-\ is a valid ASCII Control code (hex byte value 0x5c). And C-\ is not a valid ASCII control code. Therefore Emacs, in terminal mode will not be able to recognize C-M-\ In graphics mode, Emacs will be able to identify C-M-\ as it will decode the key sequence from the keyboard directly and won't have to use a terminal emulator standard. To see if a key sequence is recognized, type C-h k followed by the key sequence you're looking for. Type C-h k C-M-\ to see the mapping of that key sequence and whether it is recognized. Hope this helps, /Pierre On Sun, Jan 21, 2024 at 5:00=E2=80=AFPM Michael V. Antosha < michael.antosha@gmail.com> wrote: > On 1/21/24, Martin Marshall wrote: > > "Michael V. Antosha" writes: > > > >> 3. Using C-M-/ (i.e. pressing Ctrl+Alt+SLASH) seems to have the same > >> effect as M-/ (dabbrev-expand). > > > > What effect is that? > > I prepared a description of a test procedure to specify the effect, > but I chose to skip sending it to keep my post shorter and because it > seems unnecessary now (explained below). > > > > Are you sure there are multiple completion candidates in the buffer? > > Yes. > > > > If there's only one candidate in the buffer, `dabbrev-completion' will > > immediately complete the word without bringing up a "*Completions*" > > buffer. That would look like the same thing `dabbrev-expand' does. > > I understand differences and similarities between the two commands, I > first tested their behavior without key bindings, through M-x > dabbrev-* > > > > You can check which key Emacs thinks you pressed and which command it > > called by invoking `view-lossage' (bound to "C-h l"). > > Martin, thank you very much! > That's really useful. > > > What I'm seeing now proves my original suspicion: > - when I press "Alt+SLASH" emacs interprets it as ESC / [dabbrev-expand] > - when I press "Ctrl+Alt+SLASH" emacs interprets it, as ESC / > [dabbrev-expand] > > ESC / [dabbrev-expand] > C-h l [view-lossage] > > What could I do further to find out why these different combinations > are understood by emacs as ESC / sequence? > > > For comparison, Ctrl+Alt+BACKSLASH works fine. > Below are keys/commands from C-h l after pressing Ctr+BACKSLASH, then > Alt+BACKSLASH, then Ctrl+Alt+BACKSLASH: > > C-\ [toggle-input-method] > ... > ESC \ [delete-horizontal-space] > ... > ESC C-\ [indent-region] > C-h l [view-lossage] > > > I also tried to emulate C-M-/ by pressing ESC and then pressing Ctrl+SLAS= H, > the result is quite unexpected: > > ESC C-_ [nil] > C-h l [view-lossage] > > > -- > Michael V. Antosha > > --=20 /Pierre