From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey Horn Subject: [PATCH] Update conflict documentation Date: Tue, 11 Jan 2011 14:21:18 -0500 Message-ID: <1294773678-45568-1-git-send-email-jrhorn424@gmail.com> Return-path: Received: from [140.186.70.92] (port=32866 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcjnF-0004AD-HC for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 14:22:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcjmc-0006Pi-5L for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 14:22:09 -0500 Received: from mail-qy0-f195.google.com ([209.85.216.195]:38971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcjmc-0006Pb-3E for emacs-orgmode@gnu.org; Tue, 11 Jan 2011 14:21:30 -0500 Received: by qyk2 with SMTP id 2so5887417qyk.6 for ; Tue, 11 Jan 2011 11:21:29 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Jeffrey Horn This patch updates the conflict documentation regarding yasnippet to use Eric Schulte's fix. --- doc/org.texi | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index e83909d..b0667e4 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -13423,7 +13423,7 @@ to have other replacement keys, look at the variable @item @file{yasnippet.el} @cindex @file{yasnippet.el} -The way Org-mode binds the TAB key (binding to @code{[tab]} instead of +The way Org mode binds the TAB key (binding to @code{[tab]} instead of @code{"\t"}) overrules YASnippet's access to this key. The following code fixed this problem: @@ -13434,6 +13434,25 @@ fixed this problem: (define-key yas/keymap [tab] 'yas/next-field-group))) @end lisp +The latest version of yasnippets doesn't play well with Org mode. If the +above code does not fix the conflict, start by defining the following +function: +@lisp +(defun yas/org-very-safe-expand () + (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) +@end lisp + +Then, tell Org mode what to do with the new function: +@lisp +(add-hook 'org-mode-hook + (lambda () + (make-variable-buffer-local 'yas/trigger-key) + (setq yas/trigger-key [tab]) + (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) + (define-key yas/keymap [tab] 'yas/next-field) + )) +@end lisp + @item @file{windmove.el} by Hovav Shacham @cindex @file{windmove.el} This package also uses the @kbd{S-} keys, so everything written -- 1.7.2