From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Nicolas P. Rougier (inria)" Newsgroups: gmane.emacs.devel Subject: call-interactively behavior Date: Fri, 10 Mar 2023 07:38:06 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38154"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.14; emacs 28.2 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 10 07:53:01 2023 Return-path: Envelope-to: ged-emacs-devel@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 1paWcf-0009gg-36 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Mar 2023 07:53:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paWc0-0004Ja-2h; Fri, 10 Mar 2023 01:52:20 -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 1paWbt-0004IP-SC for emacs-devel@gnu.org; Fri, 10 Mar 2023 01:52:15 -0500 Original-Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paWbr-0005HS-R5 for emacs-devel@gnu.org; Fri, 10 Mar 2023 01:52:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=FdHPWBEECDZRpCjbfRSihYf3Cj9fyDNUb+zLLPt0QkM=; b=q0HFJFg5RM+NQk1HfKfgooYDDzJm0mMmGFrCxsxCYDEXJfU3W8BaK/v4 tRkCMTCt5rqqyoeDY0SHiTPn/kQ5yqxBiADDPoXFM9mRbd8Ssn8psbCbR +Mnsty9Ay3b8E/kirLdKfgd/c1zolw7zx9xRW6m8HO/aZwJbn9gFHkY7r 4=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=nicolas.rougier@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.98,248,1673910000"; d="scan'208";a="49755077" Original-Received: from 91-160-114-139.subs.proxad.net (HELO M-E7-NPR) ([91.160.114.139]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2023 07:52:06 +0100 Received-SPF: pass client-ip=192.134.164.104; envelope-from=nicolas.rougier@inria.fr; helo=mail3-relais-sop.national.inria.fr 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304229 Archived-At: Hi all, I'm trying to use call-interactively using the following code: #+begin_src=20 (with-current-buffer (get-buffer-create "hippie-test") (setq-local hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name)) (text-mode) (use-local-map (copy-keymap text-mode-map)) (local-set-key (kbd "TAB") 'hippie-expand) (insert "~/D") (call-interactively (key-binding (kbd "TAB"))) (call-interactively (key-binding (kbd "TAB"))) (call-interactively (key-binding (kbd "TAB")))) #+end_src In my home root, there are 3 directoriess: ~/Desktop, ~/Downloads=20 and ~/Documents. When I execute the code above, the final content in the buffer is: ~/Desktop/../../ If I switch to the buffer, insert "~/D" and hit tab three times, I=20 cycle over the three directories above, which is the expected=20 behavior. My question is thus: why I don't get the same behavior=20 and what would be the proper way to simulate the tab key press (or=20 any other key)? Nicolas --=20 Nicolas P. Rougier =E2=80=94=E2=80=94 www.labri.fr/perso/nrougier Institute of Neurodegenerative Diseases, Bordeaux