emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] YASnippet (bound to SPC) and Org in `master'
@ 2014-11-24  9:30 Sebastien Vauban
  2014-11-25  8:37 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2014-11-24  9:30 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

In Org `master' (not in `maint'), there is a bug (or conflict or ???)
when one binds `yas-expand' to SPC (the "abbrev-way"), as in the
following minimal Emacs configuration file:

--8<---------------cut here---------------start------------->8---
;; Autoloads.
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-20141117.327")
(load-library "yasnippet-autoloads")

;; Enable YASnippet in all buffers.
(yas-global-mode 1)

;; Bind yas-expand to SPC (abbrev-way).
(define-key yas-minor-mode-map (kbd "SPC") 'yas-expand)
--8<---------------cut here---------------end--------------->8---

With the above config, typing SPC after any word in any Org table cell
deletes the whole contents of the cell... [1]

When typing, for example, "Every word gets deleted on pressing SPC...",
you successively only see "Every", then "word", then "gets", ..., and
then finally "SPC..." as the cell contents!

Searching for the difference between `maint' and `master' shows that the
problem occurs since the following commit in `master':

--8<---------------cut here---------------start------------->8---
e8b51c0ce5d6dbd5f2c6cfff2d260a3f5f7ac58f is the first bad commit
commit e8b51c0ce5d6dbd5f2c6cfff2d260a3f5f7ac58f
Author: Bastien Guerry <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org>
Date:   Mon Jul 28 17:28:54 2014 +0200

    org.el (org-self-insert-command): Use `yas-expand'

    * org.el (org-self-insert-command): Use `yas-expand' as
    yas/expand is obsolete since Yasnippet 0.8.

    Thanks to Craig Tanis for reporting this.

:040000 040000 203e5106edcfa9d9809cae034e9f551819f75941 a43fde57dd3143ddd91b932f6634bb09c7857708 M      lisp
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

[1] Demo on http://screencast.com/t/KKKCQJYo.

-- 
Sebastien Vauban

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

* Re: [bug] YASnippet (bound to SPC) and Org in `master'
  2014-11-24  9:30 [bug] YASnippet (bound to SPC) and Org in `master' Sebastien Vauban
@ 2014-11-25  8:37 ` Nicolas Goaziou
  2014-11-25 14:16   ` Sebastien Vauban
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2014-11-25  8:37 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:

> In Org `master' (not in `maint'), there is a bug (or conflict or ???)
> when one binds `yas-expand' to SPC (the "abbrev-way"), as in the
> following minimal Emacs configuration file:

[...]

> With the above config, typing SPC after any word in any Org table cell
> deletes the whole contents of the cell... [1]
>
> When typing, for example, "Every word gets deleted on pressing SPC...",
> you successively only see "Every", then "word", then "gets", ..., and
> then finally "SPC..." as the cell contents!
>
> Searching for the difference between `maint' and `master' shows that the
> problem occurs since the following commit in `master':
>
> e8b51c0ce5d6dbd5f2c6cfff2d260a3f5f7ac58f is the first bad commit
> commit e8b51c0ce5d6dbd5f2c6cfff2d260a3f5f7ac58f
> Author: Bastien Guerry <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org>
> Date:   Mon Jul 28 17:28:54 2014 +0200
>
>     org.el (org-self-insert-command): Use `yas-expand'
>
>     * org.el (org-self-insert-command): Use `yas-expand' as
>     yas/expand is obsolete since Yasnippet 0.8.

I don't understand why yas-expand (or yas/expand) appears in
`org-self-insert-command'. This feature was introduced for the first
time in 94c4f801a2a8f0e0e14b48719c22e06dd9a1e599:

    Tables: Fix auto-blanking of fields is yasnippet is active.
    
    When yasnippet is active, it is the official binding of TAB.  That
    means, the org-mode self-insert command must know that it may blank
    table fields if the last command was yas/expand.

The "must know" part is not clear to me. I tend to think we should
remove it.


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] YASnippet (bound to SPC) and Org in `master'
  2014-11-25  8:37 ` Nicolas Goaziou
@ 2014-11-25 14:16   ` Sebastien Vauban
  2014-11-25 15:09     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2014-11-25 14:16 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

>> In Org `master' (not in `maint'), there is a bug (or conflict or ???)
>> when one binds `yas-expand' to SPC (the "abbrev-way"), as in the
>> following minimal Emacs configuration file:
>
> [...]
>
>> With the above config, typing SPC after any word in any Org table
>> cell deletes the whole contents of the cell... [1]
>>
>> When typing, for example, "Every word gets deleted on pressing
>> SPC...", you successively only see "Every", then "word", then "gets",
>> ..., and then finally "SPC..." as the cell contents!
>>
>> Searching for the difference between `maint' and `master' shows that
>> the problem occurs since the following commit in `master':
>>
>> e8b51c0ce5d6dbd5f2c6cfff2d260a3f5f7ac58f is the first bad commit
>> Author: Bastien Guerry <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org>
>> Date:   Mon Jul 28 17:28:54 2014 +0200
>>
>>     org.el (org-self-insert-command): Use `yas-expand'
>
> I don't understand why yas-expand (or yas/expand) appears in
> `org-self-insert-command'. This feature was introduced for the first
> time in 94c4f801a2a8f0e0e14b48719c22e06dd9a1e599:
>
>     Tables: Fix auto-blanking of fields is yasnippet is active.
>     
>     When yasnippet is active, it is the official binding of TAB.  That
>     means, the org-mode self-insert command must know that it may
>     blank table fields if the last command was yas/expand.
>
> The "must know" part is not clear to me. I tend to think we should
> remove it.

Will you do that?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] YASnippet (bound to SPC) and Org in `master'
  2014-11-25 14:16   ` Sebastien Vauban
@ 2014-11-25 15:09     ` Nicolas Goaziou
  2014-12-03 20:40       ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2014-11-25 15:09 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ, Carsten Dominik



Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:

>> I don't understand why yas-expand (or yas/expand) appears in
>> `org-self-insert-command'. This feature was introduced for the first
>> time in 94c4f801a2a8f0e0e14b48719c22e06dd9a1e599:
>>
>>     Tables: Fix auto-blanking of fields is yasnippet is active.
>>     
>>     When yasnippet is active, it is the official binding of TAB.  That
>>     means, the org-mode self-insert command must know that it may
>>     blank table fields if the last command was yas/expand.
>>
>> The "must know" part is not clear to me. I tend to think we should
>> remove it.
>
> Will you do that?

I'd rather understand the issue first. I CC Carsten if he wants to chime
in. 

The fallback plan is to do the removal and see what happens.


Regards,

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

* Re: [bug] YASnippet (bound to SPC) and Org in `master'
  2014-11-25 15:09     ` Nicolas Goaziou
@ 2014-12-03 20:40       ` Nicolas Goaziou
  2014-12-03 21:19         ` Sebastien Vauban
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2014-12-03 20:40 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ, Carsten Dominik



Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
> writes:
>
>>> I don't understand why yas-expand (or yas/expand) appears in
>>> `org-self-insert-command'. This feature was introduced for the first
>>> time in 94c4f801a2a8f0e0e14b48719c22e06dd9a1e599:
>>>
>>>     Tables: Fix auto-blanking of fields is yasnippet is active.
>>>     
>>>     When yasnippet is active, it is the official binding of TAB.  That
>>>     means, the org-mode self-insert command must know that it may
>>>     blank table fields if the last command was yas/expand.
>>>
>>> The "must know" part is not clear to me. I tend to think we should
>>> remove it.
>>
>> Will you do that?
>
> I'd rather understand the issue first. I CC Carsten if he wants to chime
> in. 
>
> The fallback plan is to do the removal and see what happens.

Done.

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

* Re: [bug] YASnippet (bound to SPC) and Org in `master'
  2014-12-03 20:40       ` Nicolas Goaziou
@ 2014-12-03 21:19         ` Sebastien Vauban
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastien Vauban @ 2014-12-03 21:19 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Nicolas Goaziou wrote:
> Nicolas Goaziou <mail-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org> writes:
>
>> Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
>> writes:
>>
>>>> I don't understand why yas-expand (or yas/expand) appears in
>>>> `org-self-insert-command'. This feature was introduced for the first
>>>> time in 94c4f801a2a8f0e0e14b48719c22e06dd9a1e599:
>>>>
>>>>     Tables: Fix auto-blanking of fields is yasnippet is active.
>>>>     
>>>>     When yasnippet is active, it is the official binding of TAB.  That
>>>>     means, the org-mode self-insert command must know that it may
>>>>     blank table fields if the last command was yas/expand.
>>>>
>>>> The "must know" part is not clear to me. I tend to think we should
>>>> remove it.
>>>
>>> Will you do that?
>>
>> I'd rather understand the issue first. I CC Carsten if he wants to chime
>> in. 
>>
>> The fallback plan is to do the removal and see what happens.
>
> Done.

Checked.  Works.  THANKS A LOT -- this ends a painful editing of the
tables!

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2014-12-03 21:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24  9:30 [bug] YASnippet (bound to SPC) and Org in `master' Sebastien Vauban
2014-11-25  8:37 ` Nicolas Goaziou
2014-11-25 14:16   ` Sebastien Vauban
2014-11-25 15:09     ` Nicolas Goaziou
2014-12-03 20:40       ` Nicolas Goaziou
2014-12-03 21:19         ` Sebastien Vauban

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