From: Jeff Horn <jrhorn424@gmail.com>
To: Org-mode ml <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix conflict doc
Date: Tue, 11 Jan 2011 01:19:58 -0500 [thread overview]
Message-ID: <AANLkTik+9Ga4246N5Edrf3QLxB+hQQt_kge8MNZ16Hon@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
(Eric, mind glancing at the patch?)
In regard to the following message:
http://article.gmane.org/gmane.emacs.orgmode/35931
This patch incorporates Eric Schulte's method of making org-mode work
with yasnippet into the documentation.
--
Jeffrey Horn
http://www.failuretorefrain.com/jeff/
[-- Attachment #2: fix-conflict-doc.patch --]
[-- Type: application/octet-stream, Size: 1817 bytes --]
From 1a6798b117d163ba51cfc890eb5aa0af65532168 Mon Sep 17 00:00:00 2001
From: Jeffrey Horn <jrhorn424@gmail.com>
Date: Tue, 11 Jan 2011 01:02:25 -0500
Subject: [PATCH] Update conflict documentation
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-<cursor>} keys, so everything written
--
1.7.2
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2011-01-11 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 6:19 Jeff Horn [this message]
2011-01-11 16:35 ` [PATCH] Fix conflict doc Jeff Horn
2011-01-11 17:25 ` Nick Dokos
2011-01-11 17:24 ` Eric Schulte
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=AANLkTik+9Ga4246N5Edrf3QLxB+hQQt_kge8MNZ16Hon@mail.gmail.com \
--to=jrhorn424@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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.