emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: nicholas.dokos@hp.com
Cc: Bernt Hansen <bernt@norang.ca>,
	Emacs-orgmode@gnu.org, Water Lin <WaterLin@ymail.com>
Subject: Re: Re: short way to insert source tag in org mode?
Date: Tue, 29 Sep 2009 10:36:21 +0100	[thread overview]
Message-ID: <87ws3inld6.wl%ucecesf@ucl.ac.uk> (raw)
In-Reply-To: <354.1254195362@gamaville.dokosmarshall.org>

At Mon, 28 Sep 2009 23:36:02 -0400,
Nick Dokos wrote:
> 
> Bernt Hansen <bernt@norang.ca> wrote:
> 
> > > Using Bernt's setup, I can get the block expanded using C-i, but the <tab>
> > > key itself is bound to org-cycle. When I say
> > >
> > >     C-h c <tab>
> > >
> > > emacs says "<tab>", whereas if I say
> > >
> > >     C-h c C-i
> > >
> > > emacs says "TAB". In an emacs without yasnippets, otoh,
> > >
> > >     C-h c <tab>
> > >
> > > says "TAB (translated from <tab>". This is all under X of course: I suspect
> > > that on a console, things would be simpler.
> > 
> > For me both TAB and C-i run the command yas/expand (according to C-h k).
> > I'm using GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
> > 2008-11-09 on raven, modified by Debian.
> > 
> > I get <tab> and TAB as Nick does but both run yas/expand.
> > 
> > I've never tried it in Emacs 23.
> > 
> 
> I thought that Emacs23 would be the explanation, but I get the different
> behavior even with Emacs 22. Ah, well: a mystery that will remain a mystery
> (at last, afaiac...)
> 
> Nick

Nick,

I have both TAB and C-i bound to yas/expand.  I use the following in
my .emacs org-mode setup section:

--8<---------------cut here---------------start------------->8---
(add-hook 'org-mode-hook
          '(lambda ()
             (make-variable-buffer-local 'yas/trigger-key)
             (setq yas/trigger-key [tab])
	     (define-key yas/keymap [tab] 'yas/next-field-group) ; from Richard Riley in org-mode mailing list
	     )
	  )
--8<---------------cut here---------------end--------------->8---

HTH.

  reply	other threads:[~2009-09-29  9:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27  6:22 short way to insert source tag in org mode? Water Lin
2009-09-27 14:50 ` Bernt Hansen
2009-09-28  9:50   ` Eric S Fraga, Eric S Fraga
2009-09-29  1:48   ` Water Lin
2009-09-29  2:45     ` Nick Dokos
2009-09-29  3:14       ` Bernt Hansen
2009-09-29  3:36         ` Nick Dokos
2009-09-29  9:36           ` Eric S Fraga, Eric S Fraga [this message]
2009-09-29  3:18       ` Water Lin
2009-09-29  7:15         ` Stephan Schmitt
2009-09-27 17:28 ` Matt Lundin
2009-09-29  9:25   ` Carsten Dominik

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87ws3inld6.wl%ucecesf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=Emacs-orgmode@gnu.org \
    --cc=WaterLin@ymail.com \
    --cc=bernt@norang.ca \
    --cc=e.fraga@ucl.ac.uk \
    --cc=nicholas.dokos@hp.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).