all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: edgar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 56630@debbugs.gnu.org
Subject: bug#56630: (yasnippet) how to disable TAB <tab> C-i?
Date: Tue, 08 Nov 2022 14:10:08 +0000	[thread overview]
Message-ID: <4dfae574e6088b8ad71b2f6574797d64@cryptolab.net> (raw)
In-Reply-To: <4c539d1346282acef8766240ad0e5659@cryptolab.net>

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





      reply	other threads:[~2022-11-08 14:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4dfae574e6088b8ad71b2f6574797d64@cryptolab.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=56630@debbugs.gnu.org \
    --cc=edgarlux@cryptolab.net \
    --cc=larsi@gnus.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.