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: Fwd: Re: (yasnippet) how to disable TAB C-i? Date: Mon, 18 Jul 2022 15:34:00 +0000 Message-ID: References: <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="8288"; 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:35:25 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 1oDSmK-0001xs-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 17:35:24 +0200 Original-Received: from localhost ([::1]:44898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDSmI-0007z5-Li for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jul 2022 11:35:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDSlz-0007xh-OI for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDSly-000257-Dp for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDSly-0000Wx-9m for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2022 11:35: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:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56630 X-GNU-PR-Package: emacs Original-Received: via spool by 56630-submit@debbugs.gnu.org id=B56630.16581584621985 (code B ref 56630); Mon, 18 Jul 2022 15:35:02 +0000 Original-Received: (at 56630) by debbugs.gnu.org; 18 Jul 2022 15:34:22 +0000 Original-Received: from localhost ([127.0.0.1]:51868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDSlJ-0000Vw-LK for submit@debbugs.gnu.org; Mon, 18 Jul 2022 11:34:22 -0400 Original-Received: from smtp152.vfemail.net ([146.59.185.152]:59297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDSlH-0000Vo-Ek for 56630@debbugs.gnu.org; Mon, 18 Jul 2022 11:34:20 -0400 Original-Received: (qmail 20316 invoked from network); 18 Jul 2022 15:34:18 +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:34:18 +0000 Original-Received: (qmail 36375 invoked from network); 18 Jul 2022 15:33:43 -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:33:43 -0000 Original-Received: (qmail 35625 invoked from network); 18 Jul 2022 15:33:26 -0000 Original-Received: by simscan 1.4.0 ppid: 35620, pid: 35622, t: 0.1086s 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:33:25 -0000 In-Reply-To: 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] 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:237363 Archived-At: -------- Original Message -------- Subject: Re: (yasnippet) how to disable TAB C-i? Date: 2022-07-18 15:32 From: edgar@openmail.cc To: bug-gnu-emacs@gnu.org Of course: - yasnippet-snippets 20220401.1534 c5bf4c4085aa61b9c07563de89f7aacc2a357db5 - GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-28 On 2022-07-18 15:29, edgar@openmail.cc wrote: > 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!