From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: edgar@openmail.cc Newsgroups: gmane.emacs.bugs Subject: bug#56630: (yasnippet) how to disable TAB C-i? Date: Mon, 18 Jul 2022 15:29:37 +0000 Message-ID: <7c9d7521f61e42b56ac9fe6aeb2aed5a@openmail.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.3.17 To: 56630@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 18 17:31:27 2022 Return-path: Envelope-to: geb-bug-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 1oDSiV-0006ZE-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 17:31:27 +0200 Original-Received: from localhost ([::1]:42534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDSiU-0005Fs-OJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 11:31:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDSi6-0005Ew-Ui for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDSi6-0001b5-BT for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDSi6-0000QP-2v for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: edgar@openmail.cc Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jul 2022 15:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56630 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16581582061487 (code B ref -1); Mon, 18 Jul 2022 15:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Jul 2022 15:30:06 +0000 Original-Received: from localhost ([127.0.0.1]:51859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDShC-0000Nn-FK for submit@debbugs.gnu.org; Mon, 18 Jul 2022 11:30:06 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDSh9-0000Nc-15 for submit@debbugs.gnu.org; Mon, 18 Jul 2022 11:30:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDSh8-0004ID-SR for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:30:02 -0400 Original-Received: from smtp152.vfemail.net ([146.59.185.152]:46615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDSh6-0001GY-FB for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:30:02 -0400 Original-Received: (qmail 20197 invoked from network); 18 Jul 2022 15:29:55 +0000 Original-Received: from localhost (HELO freequeue.vfemail.net) () by smtpout.vfemail.net with ESMTPS (ECDHE-RSA-AES256-GCM-SHA384 encrypted); 18 Jul 2022 15:29:55 +0000 Original-Received: (qmail 24562 invoked from network); 18 Jul 2022 15:29:19 -0000 Original-Received: from localhost (HELO nl101-2.vfemail.net) (bmE=@127.0.0.1) by freequeue.vfemail.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 18 Jul 2022 15:29:19 -0000 Original-Received: (qmail 23993 invoked from network); 18 Jul 2022 15:29:02 -0000 Original-Received: by simscan 1.4.0 ppid: 23989, pid: 23991, t: 0.0071s scanners:none Original-Received: from unknown (HELO www.vfemail.net) (ZWRnYXJAb3Blbm1haWwuY2M=@192.168.1.192) by nl101.vfemail.net with ESMTPA; 18 Jul 2022 15:29:02 -0000 X-Sender: edgar@openmail.cc X-Remote-Browser: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0 X-Originating-IP: [2a03:e600:100::26] Received-SPF: pass client-ip=146.59.185.152; envelope-from=edgar@openmail.cc; helo=smtp152.vfemail.net 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237361 Archived-At: Hello, as per: https://github.com/joaotavora/yasnippet, I am sending an e-mail to you to ask for help. I really like yasnippets, because it makes my workflow more productive, but I have not been able to disable the autocompletion with the TAB key: * What I have tried (use-package yasnippet :defer t :commands (yas-minor-mode) :bind (:map yas-minor-mode-map ("TAB" . nil) ("" . nil) ;; Expand with C-c m ;; (how?? yas--direct-{keymaps,org-mode}) ("C-c m". yas-expand) ;; Change C-S-i to navigate back ("ESC TAB" . yas-prev-field) :map esc-map ;; Disable this to enable C-S-i to navigate back ;; (previously defined in bindings.el) ("\t" . nil))) (with-eval-after-load 'yasnippet (setq yas-snippet-dirs (list "~/snippets/")) (yas--load-snippet-dirs) ;; allow to insert a snippet within a snippet (setq yas-triggers-in-field t) ;; Testing (above) ;; ;; Change trigger key ;; (define-key yas-minor-mode-map (kbd "C-i") nil) ;; (define-key yas-minor-mode-map (kbd "C-c m") 'yas-expand) ;; (define-key yas-minor-mode-map [(tab)] nil) ;; (define-key yas-minor-mode-map (kbd "TAB") nil) ;; (define-key yas-minor-mode-map (kbd "") nil) ) * Current behaviour 1. I launch a snippet with C-c m 2. Inside, I type the name of another snippet, for clarity, assume it is tuk 3. I type [TAB], C-i 4. tuk gets expandedtuk * Expected behaviour 1. I launch a snippet with C-c m 2. Inside, I type the name of another snippet, for clarity, assume it is tuk 3. I type [TAB], C-i 4. I get out of ttukhe first snippet (tuk does not get expanded). tuk is this: # -*- mode: snippet -*- # name: latex-inline # key: tuk # expand-env: ((yas-indent-line 'fixed)) # -- \\($1\\)$0 How do I configure yasnippet so that snippets get expended with C-c m *only*? Thanks! ------------------------------------------------- This free account was provided by VFEmail.net - report spam to abuse@vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!