all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
@ 2022-07-18 15:29 edgar
  2022-07-18 15:32 ` edgar
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: edgar @ 2022-07-18 15:29 UTC (permalink / raw)
  To: 56630

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)
    ("<tab>" . 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 "<tab>")  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!  





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-18 15:29 bug#56630: (yasnippet) how to disable TAB <tab> C-i? edgar
@ 2022-07-18 15:32 ` edgar
  2022-07-18 15:34   ` bug#56630: Fwd: " edgar
  2022-07-23  8:05 ` bug#56630: " Lars Ingebrigtsen
  2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 1 reply; 10+ messages in thread
From: edgar @ 2022-07-18 15:32 UTC (permalink / raw)
  To: 56630

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)
>    ("<tab>" . 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 "<tab>")  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!  





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: Fwd: Re: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-18 15:32 ` edgar
@ 2022-07-18 15:34   ` edgar
  0 siblings, 0 replies; 10+ messages in thread
From: edgar @ 2022-07-18 15:34 UTC (permalink / raw)
  To: 56630



-------- Original Message --------
Subject: Re: (yasnippet) how to disable TAB <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)
>    ("<tab>" . 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 "<tab>")  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!  





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-18 15:29 bug#56630: (yasnippet) how to disable TAB <tab> C-i? edgar
  2022-07-18 15:32 ` edgar
@ 2022-07-23  8:05 ` Lars Ingebrigtsen
  2022-07-24 17:07   ` edgar
  2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-23  8:05 UTC (permalink / raw)
  To: edgar; +Cc: 56630

edgar@openmail.cc writes:

> 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)
>    ("<tab>" . nil)

I'm not familiar with use-package or the syntax it uses for keymaps, but
does

   (:map
    yas-minor-mode-map
    ("TAB" . nil)
    ([(tab)] . nil)

fix the issue?






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-23  8:05 ` bug#56630: " Lars Ingebrigtsen
@ 2022-07-24 17:07   ` edgar
  2022-07-26 12:07     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: edgar @ 2022-07-24 17:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 56630

On 2022-07-23 08:05, Lars Ingebrigtsen wrote:
> I'm not familiar with use-package or the syntax it uses for keymaps, 
> but
> does
> 
>    (:map
>     yas-minor-mode-map
>     ("TAB" . nil)
>     ([(tab)] . nil)
> 
> fix the issue?

Hi Lars,

Unfortunately, not. This does not work either:

(with-eval-after-load 'yasnippet

   (setq yas-snippet-dirs
         (list "~/.emacs.d/snippets/"))
   (yas--load-snippet-dirs)
   ;; allow to insert a snippet within a snippet
   (setq yas-triggers-in-field t)
   ;; 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 "<tab>")  nil))

-------------------------------------------------
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!  





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-24 17:07   ` edgar
@ 2022-07-26 12:07     ` Lars Ingebrigtsen
  2022-07-31 22:32       ` Noam Postavsky
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-26 12:07 UTC (permalink / raw)
  To: edgar; +Cc: 56630, Noam Postavsky

edgar@openmail.cc writes:

> Unfortunately, not. This does not work either:
>
> (with-eval-after-load 'yasnippet
>
>   (setq yas-snippet-dirs
>         (list "~/.emacs.d/snippets/"))
>   (yas--load-snippet-dirs)
>   ;; allow to insert a snippet within a snippet
>   (setq yas-triggers-in-field t)
>   ;; 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 "<tab>")  nil))

Looking at yasnippet.el, I don't see any obvious reason why that
shouldn't work.  Perhaps Noam has some comments; added to the CCs.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-26 12:07     ` Lars Ingebrigtsen
@ 2022-07-31 22:32       ` Noam Postavsky
  2022-08-01 20:00         ` edgar
  0 siblings, 1 reply; 10+ messages in thread
From: Noam Postavsky @ 2022-07-31 22:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: edgar, 56630

> edgar@openmail.cc writes:

> >   (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 "<tab>")  nil))

I think there are some redundancies ((kbd "C-i") == (kbd "TAB") and
(kbd "<tab>") ~= [(tab)]), but yes, that should work. I haven't kept
up with yasnippet maintenance, so possibly there is some failure with
more recent Emacs versions (although I don't see any version numbers
mentioned in the bug report)?

Also, it would be useful to have a fully contained minimal
reproducible example, to eliminate mistakes of the sort where you have
accidentally have an extra unnoticed bit code in your init files which
is messing things up, or the yasnippet part in your config isn't
actually being evaluated for some reason.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-31 22:32       ` Noam Postavsky
@ 2022-08-01 20:00         ` edgar
  0 siblings, 0 replies; 10+ messages in thread
From: edgar @ 2022-08-01 20:00 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Lars Ingebrigtsen, 56630

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On 2022-07-31 22:32, Noam Postavsky wrote:
> Also, it would be useful to have a fully contained minimal
> reproducible example, to eliminate mistakes of the sort where you have
> accidentally have an extra unnoticed bit code in your init files which
> is messing things up, or the yasnippet part in your config isn't
> actually being evaluated for some reason.

Thanks, I think that I had sent this:

"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"
yasnippet                      20200604.246
org                            20210929

just in case,
(yas-about)
"yasnippet (version 0.14.0-snapshot20200604.246) -- 
pluskid/joaotavora/npostavs"

(org-version)
9.4.6

I am also attaching an org file which may serve to show a minimal 
(not-working) configuration.

-------------------------------------------------
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!  

[-- Attachment #2: init.org.gz --]
[-- Type: application/x-gzip, Size: 1081 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-07-18 15:29 bug#56630: (yasnippet) how to disable TAB <tab> C-i? edgar
  2022-07-18 15:32 ` edgar
  2022-07-23  8:05 ` bug#56630: " Lars Ingebrigtsen
@ 2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-11-08 14:10   ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 1 reply; 10+ messages in thread
From: edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-08 14:09 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Lars Ingebrigtsen, 56630

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

I tried to send the e-mail below on 2022-08-01 20:00, but apparently it 
is not here (I'm blaming my other e-mail provider): 
https://mail.gnu.org/archive/html/bug-gnu-emacs/2022-07/msg02612.html

On 2022-07-31 22:32, Noam Postavsky wrote:

     Also, it would be useful to have a fully contained minimal
     reproducible example, to eliminate mistakes of the sort where you 
have
     accidentally have an extra unnoticed bit code in your init files 
which
     is messing things up, or the yasnippet part in your config isn't
     actually being evaluated for some reason.


Thanks, I think that I had sent this:

"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"
yasnippet                      20200604.246
org                            20210929

just in case,
(yas-about)
"yasnippet (version 0.14.0-snapshot20200604.246) -- 
pluskid/joaotavora/npostavs"

(org-version)
9.4.6

I am also attaching an org file which may serve to show a minimal 
(not-working) configuration.

[-- Attachment #2: init.org.gz --]
[-- Type: application/gzip, Size: 1081 bytes --]

[-- Attachment #3: Re bug#56630 (yasnippet) how to disable TAB tab C-i .eml --]
[-- Type: text/plain, Size: 3630 bytes --]

MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_a906001957c38fd15153f46153b2c0c6"
Date: Mon, 01 Aug 2022 20:00:17 +0000
From: edgar@openmail.cc
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 56630@debbugs.gnu.org
Subject: Re: bug#56630: (yasnippet) how to disable TAB <tab> C-i?
In-Reply-To: <CAM-tV-_axOS=0rdcNCMWmCu8PbqxzVk8jiFv5-NC=SJ4DL3S1g@mail.gmail.com>
References: <7c9d7521f61e42b56ac9fe6aeb2aed5a@openmail.cc>
 <87v8ro1cfn.fsf@gnus.org> <3c6ccde173b1fb4c64c81f14f24fc52d@openmail.cc>
 <8735eo3wnn.fsf@gnus.org>
 <CAM-tV-_axOS=0rdcNCMWmCu8PbqxzVk8jiFv5-NC=SJ4DL3S1g@mail.gmail.com>
Message-ID: <950baf34d569b8c9a610221ef3c9d26e@openmail.cc>
X-Sender: edgar@openmail.cc
User-Agent: Roundcube Webmail/1.3.17
X-Remote-Browser: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101
 Firefox/91.0
X-Originating-IP: [2405:8100:8000:5ca1::d:609a]

--=_a906001957c38fd15153f46153b2c0c6
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

On 2022-07-31 22:32, Noam Postavsky wrote:
> Also, it would be useful to have a fully contained minimal
> reproducible example, to eliminate mistakes of the sort where you have
> accidentally have an extra unnoticed bit code in your init files which
> is messing things up, or the yasnippet part in your config isn't
> actually being evaluated for some reason.

Thanks, I think that I had sent this:

"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"
yasnippet                      20200604.246
org                            20210929

just in case,
(yas-about)
"yasnippet (version 0.14.0-snapshot20200604.246) -- 
pluskid/joaotavora/npostavs"

(org-version)
9.4.6

I am also attaching an org file which may serve to show a minimal 
(not-working) configuration.
--=_a906001957c38fd15153f46153b2c0c6
Content-Transfer-Encoding: base64
Content-Type: application/x-gzip;
 name=init.org.gz
Content-Disposition: attachment;
 filename=init.org.gz;
 size=1081

H4sICL0v6GICA2luaXQub3JnAO1YzXLbNhA+m0+xI2dGZBNKdXtoytTNpE4OPju3JNOC5IpEBQI0
AUpWPH6NPkYeKk/SBUBSoqrG1vSQTMe82Fjs/367XOr0acZqw5VM4EryukYDCy4wOH2aYsHl77rJ
YNHKnFUoDROQGCYLgTA3VT3XXmKumiKuVI7zVKhsCUnOG0iqJf2pYYM6ADiF+LsYLE8CnZSluBtJ
uhNwou68xI09einL8t65cus47m6fnN0FJwBPvrc3KPOOTh7TwfobBK8VapDKwFo1S1hzUwKTG1AL
MCXCQgmh1lwWkCm54EXbMJsAF7eGsGklMA3nWLFMQ3wNsfDRcsnNDHcPFPd5RIaHFF4SlTPBP241
wtkol05rLLiux6nslScN6lYY675EijBs8LrlDcK0ZtmSFRhZYvd/zHt7njzwthrjXf6dM2xYVwC6
AHjxAhKUum32L5IcF9jAwMVao4RiOfwx8E1hXaJ0hLjiUjUOBFPgGjImBOa9bKtttm0JKmRSJ7Di
DBiUSi1BNZBuiAObnhugNKbWyXzukjXThjzHm6ykdOEsU9Wczc+eP//5J+8nESomc6rc2I/IX6dc
ej/CpGI1jHliIlkwhZO3r36bwAwkF5En/GJY+usuiTx7c1OTJQ+oiziDqqOHpVq/fOl0xwR6zEx8
Sygm5fpZ3xt3nV4nN5k5ZnT6eu0XLkBSfBVzMIr6YsULZhBSit8Lv7m6gM5TK183uIoXHEUeRTsx
os76wEjta65ZSjAzJdWF1KJ0x383YwOymrlqtdgA4YBLzIFLsLmkSmoCahfNe9OnyHkQ2tTEuGIi
ZguDTewQM90iy3up0Vy7ADqyTZp2CqkxDExGw2XSx+bSaxWOxKIBoLarbUBcEpgM4asfNNYp8n4g
7DlhGl4U2GjqJp9MMIPSriYdix1NXtgnJabzAURBuExzoErzSeThc4SMRUfkUjbA4wHS70KCa/QB
uuc4oxZR0fFivkOiTszLsTyPXVtPe9y7o62tuxesSnMGIcHnhNL7KjN8ZbG3RcjJyX4fW2gFXf0L
oVICl+/vwJVIZzS/s9J3JVl1b5mgL3A3IcntPzt9W9ei3XfGPVP8h8cp/nWmuK/941x5nCv/y7ny
4+Nc+ba3ww5gowWxp413RE89uCYOVw/cFHsDh5bFQdeX98VexXEr46D8uK1xG98DFsfes9Hu+F+H
PAzPtzPrvzy6YPTsTDDYew7Ps32urzPdOqg7lDhV5w6y52DfG0QRYvgOj5Jh1OENq2qBAX3ke109
IXhL3+csVSv0vweAB70mh6gozkpoP+Ft4/jxaO2W2KD7sq8V8VmSw48X1jRqD5ge/6bw+a9Pd0Hw
z18TBr8uF7BRLZTcwDvqpg9gbT4DOvYesoIRPkIXbckMXMKaSRPN7rGcivts/w0qGdYXohEAAA==
--=_a906001957c38fd15153f46153b2c0c6--

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#56630: (yasnippet) how to disable TAB <tab> C-i?
  2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-11-08 14:10   ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 10+ messages in thread
From: edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-11-08 14:10 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Lars Ingebrigtsen, 56630

On 2022-11-08 14:09, edgar wrote:
> I tried to send the e-mail below on 2022-08-01 20:00, but apparently
> it is not here (I'm blaming my other e-mail provider):
> https://mail.gnu.org/archive/html/bug-gnu-emacs/2022-07/msg02612.html
> 
> On 2022-07-31 22:32, Noam Postavsky wrote:
> 
>     Also, it would be useful to have a fully contained minimal
>     reproducible example, to eliminate mistakes of the sort where you 
> have
>     accidentally have an extra unnoticed bit code in your init files 
> which
>     is messing things up, or the yasnippet part in your config isn't
>     actually being evaluated for some reason.
> 
> 
> Thanks, I think that I had sent this:
> 
> "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"
> yasnippet                      20200604.246
> org                            20210929
> 
> just in case,
> (yas-about)
> "yasnippet (version 0.14.0-snapshot20200604.246) -- 
> pluskid/joaotavora/npostavs"
> 
> (org-version)
> 9.4.6
> 
> I am also attaching an org file which may serve to show a minimal
> (not-working) configuration.

I hope that I am not ahead of myself, but this seems to be working

(autoload 'yas-minor-mode "yasnippet")
(autoload 'yas-expand "yasnippet")
(with-eval-after-load 'yasnippet
   ;; Default directories to look for snippets
   (setq yas-snippet-dirs
         (list "~/.emacs.d/snippets/"))
   (yas--load-snippet-dirs)
   ;; allow to insert a snippet within a snippet
   (setq yas-triggers-in-field t)
   ;; 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 "<tab>")  nil)
   (define-key global-map [remap yas-next-field-or-maybe-expand] 
'yas-next-field))

(add-hook 'org-mode-hook
           (lambda ()
             ;; Activate yasnippet
             (yas-minor-mode)
             ;; Add the latex snippets
             (yas-activate-extra-mode 'latex-mode)))





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-08 14:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-18 15:29 bug#56630: (yasnippet) how to disable TAB <tab> C-i? edgar
2022-07-18 15:32 ` edgar
2022-07-18 15:34   ` bug#56630: Fwd: " edgar
2022-07-23  8:05 ` bug#56630: " Lars Ingebrigtsen
2022-07-24 17:07   ` edgar
2022-07-26 12:07     ` Lars Ingebrigtsen
2022-07-31 22:32       ` Noam Postavsky
2022-08-01 20:00         ` edgar
2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-08 14:10   ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.