emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Update conflict documentation
@ 2011-01-11 19:21 Jeffrey Horn
  2011-01-12 11:27 ` Giovanni Ridolfi
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey Horn @ 2011-01-11 19:21 UTC (permalink / raw)
  To: emacs-orgmode; +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-<cursor>} keys, so everything written
-- 
1.7.2

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

* Re: [PATCH] Update conflict documentation
  2011-01-11 19:21 [PATCH] Update conflict documentation Jeffrey Horn
@ 2011-01-12 11:27 ` Giovanni Ridolfi
  2011-01-15 11:40   ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Ridolfi @ 2011-01-12 11:27 UTC (permalink / raw)
  To: Jeffrey Horn; +Cc: emacs-orgmode, Carsten Dominik

Jeffrey Horn <jrhorn424@gmail.com> writes:

> 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

IIRC we have already discussed the right way to refer to our beloved 
Unique ;-)  GNU/Emacs mode:

"Org-mode" or "Org mode" ? 

I think Carsten wrote something but, I can't get any reference, sorry :-( 

In the site I thik that it is (almost) always written "Org-mode" or "Org".

In the info file of my version[1] there are both the two strings.

So  
1. What is the correct way?
2. I'm willing to make a patch replacing, in the latest org.texi,
   M-% wrong-string right-string         ;-)
  
cheers,
Giovanni

[1] a bit old I know:
Org-mode version 7.4 commit-de39bf05bea84b842711faa49e560ea4bc087211

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

* Re: [PATCH] Update conflict documentation
  2011-01-12 11:27 ` Giovanni Ridolfi
@ 2011-01-15 11:40   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2011-01-15 11:40 UTC (permalink / raw)
  To: Giovanni Ridolfi; +Cc: Jeffrey Horn, emacs-orgmode, Carsten Dominik

Hi Giovanni,

Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> IIRC we have already discussed the right way to refer to our beloved 
> Unique ;-)  GNU/Emacs mode:
>
> "Org-mode" or "Org mode" ? 
>
> I think Carsten wrote something but, I can't get any reference, sorry :-( 
>
> In the site I thik that it is (almost) always written "Org-mode" or "Org".
>
> In the info file of my version[1] there are both the two strings.
>
> So  
> 1. What is the correct way?

I'm not sure there is a correct and a wrong way.  

I tend to use "Org" when referring to the large set of Org-related
features and libraries, and I use "Org-mode" when referring to the core
features of the mode itself -- but it's not that easy to determine, and
context is important.  Let's keep this in mind and fix only the obvious
cases (if any!)

Thanks,

-- 
 Bastien

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

end of thread, other threads:[~2011-01-15 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 19:21 [PATCH] Update conflict documentation Jeffrey Horn
2011-01-12 11:27 ` Giovanni Ridolfi
2011-01-15 11:40   ` Bastien

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