Insertion problem with helm-show-kill-ring

14 views
Skip to first unread message

Sebastien Vauban

unread,
May 8, 2015, 8:10:27 AM5/8/15
to emacs...@googlegroups.com
Hello,

When using `C-y', followed by `helm-show-kill-ring', I get whatever
killed region inserted at a wrong place (point - 1 or so), instead of at
point.

Recipe:

1. With `M-w', copy these strings into the kill ring (as 2 different entries of
one line each):

AAAA BBBB CCCC

FFFFFFFFFFFFFF

2. Insert with `C-y' the last copied entry ("FFFFFFFFFFFFFF") between the two
paragraphs from the sample text.

3. Call `M-y' to insert "AAAA BBBB CCCC" instead.

The end of the first paragraph (the dot, here) gets moved after the
insertion.

Sample text:

--8<---------------cut here---------------start------------->8---
You wrote this.

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
--8<---------------cut here---------------end--------------->8---

- Video: http://screencast.com/t/yTUYP6bmkX5.
- Screenshot: http://screencast.com/t/vy4uXCAF009D

Best regards,
Seb

PS- Config:

--8<---------------cut here---------------start------------->8---
(global-set-key (kbd "M-y") 'helm-show-kill-ring)

(with-eval-after-load "helm-ring"

;; Max number of lines displayed per candidate in kill-ring browser.
(setq helm-kill-ring-max-lines-number 20))
--8<---------------cut here---------------end--------------->8---

--
Sebastien Vauban

Michael Heerdegen

unread,
May 8, 2015, 10:19:18 AM5/8/15
to emacs...@googlegroups.com
Sebastien Vauban <sva-...@mygooglest.com>
writes:

> Hello,
>
> When using `C-y', followed by `helm-show-kill-ring', I get whatever
> killed region inserted at a wrong place (point - 1 or so), instead of at
> point.

I tried to reproduce, but could not - works fine for me.

Does this happen for you with helm.sh?


Thanks,

Michael.

Thierry Volpiatto

unread,
May 9, 2015, 12:37:01 PM5/9/15
to emacs...@googlegroups.com

Michael Heerdegen <michael_...@web.de> writes:

> Sebastien Vauban <sva-...@mygooglest.com>
> writes:
>
>> Hello,
>>
>> When using `C-y', followed by `helm-show-kill-ring', I get whatever
>> killed region inserted at a wrong place (point - 1 or so), instead of at
>> point.
>
> I tried to reproduce, but could not - works fine for me.

Same here.

> Does this happen for you with helm.sh?

I.e helm.sh == emacs-helm.sh

--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

Sebastien Vauban

unread,
May 11, 2015, 5:48:29 AM5/11/15
to emacs...@googlegroups.com
Michael, Thierry,

Heerdegen wrote:
> Sebastien Vauban writes:
>>
>> When using `C-y', followed by `helm-show-kill-ring', I get whatever
>> killed region inserted at a wrong place (point - 1 or so), instead of
>> at point.
>
> I tried to reproduce, but could not - works fine for me.
>
> Does this happen for you with helm.sh?

It seems, indeed, that you need flyspell-mode to be activated (on the
example Org file, for this case) for the problem to occur!

This minimal file is enough to show it:

--8<---------------cut here---------------start------------->8---
(setq ispell-program-name "c:/Program Files (x86)/Aspell/bin/aspell.exe")

;; Enable on-the-fly spell checking.
(add-hook 'org-mode-hook 'flyspell-mode)

;; open Helm (QuickSilver-like candidate-selection framework)
(add-to-list 'load-path "~/.emacs.d/elpa/helm-20150510.45/")

(require 'helm-config) ; Explicitly loads `helm-autoloads'!

(with-eval-after-load "helm-autoloads"
(global-set-key (kbd "M-y") 'helm-show-kill-ring))
--8<---------------cut here---------------end--------------->8---

Note that, even with Flyspell enabled, the problem does not occur if one
uses the basic (not Helm) `show-kill-ring' functionality.

Best regards,
Seb

--
Sebastien Vauban

Thierry Volpiatto

unread,
May 11, 2015, 7:28:18 AM5/11/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> It seems, indeed, that you need flyspell-mode to be activated (on the
> example Org file, for this case) for the problem to occur!

Still not reproductible, try from emacs-helm.sh as Michael suggested.

>
> This minimal file is enough to show it:
>
>
> ;; open Helm (QuickSilver-like candidate-selection framework)
> (add-to-list 'load-path "~/.emacs.d/elpa/helm-20150510.45/")

Bad, unneeded.

> (require 'helm-config) ; Explicitly loads `helm-autoloads'!

> (with-eval-after-load "helm-autoloads"

Bad, unneeded.

Sebastien Vauban

unread,
Jun 16, 2015, 5:43:43 AM6/16/15
to emacs...@googlegroups.com
Michael Heerdegen writes:
> Sebastien Vauban writes:
>>
>> When using `C-y', followed by `helm-show-kill-ring', I get whatever
>> killed region inserted at a wrong place (point - 1 or so), instead of
>> at point.
>
> I tried to reproduce, but could not - works fine for me.

I've spent another half an hour on it in order to make a new test with
Flyspell working in my Cygwin Emacs, so that we finally have a full view
with all data points:

| | Cygwin Emacs 24.5.1 | Windows Emacs 25.0.50.1 |
|----------------------+---------------------+-------------------------|
| Flyspell not enabled | OK | OK |
| Flyspell enabled | OK | ¡¡¡KO!!! |

I've fixed the path to the ispell program in "helm-bug.el" so that
Flyspell is correctly enabled in both the Cygwin Emacs and the Windows
Emacs:

--8<---------------cut here---------------start------------->8---
(setq ispell-program-name
(cond ((eq system-type 'cygwin)
"/cygdrive/c/Program Files (x86)/Aspell/bin/aspell.exe")
((eq system-type 'windows-nt)
"c:/Program Files (x86)/Aspell/bin/aspell.exe")))
--8<---------------cut here---------------end--------------->8---

And I've made another screencast comparing both Emacs versions:

http://screencast.com/t/IWA6WggXDh6

Screenshot of the problem: http://screencast.com/t/vH4UF5Fn.

Now, to remind you, I had first discovered that problem on my usual
Emacs environment, that is a Windows Emacs 24.5.1.

That means that Emacs 25 is not the culprit, but somehow a difference
between Cygwin Emacs and Windows Emacs...

Michael Heerdegen

unread,
Jun 16, 2015, 10:14:01 AM6/16/15
to emacs...@googlegroups.com
Sebastien Vauban <sva-...@mygooglest.com>
writes:

> I've spent another half an hour on it in order to make a new test with
> Flyspell working in my Cygwin Emacs, so that we finally have a full view
> with all data points:
>
> | | Cygwin Emacs 24.5.1 | Windows Emacs 25.0.50.1 |
> |----------------------+---------------------+-------------------------|
> | Flyspell not enabled | OK | OK |
> | Flyspell enabled | OK | ¡¡¡KO!!! |

And was this test performed using emacs-helm.sh this time?

Michael.

Michael Heerdegen

unread,
Jun 16, 2015, 10:15:19 AM6/16/15
to emacs...@googlegroups.com
Sebastien Vauban <sva-...@mygooglest.com>
writes:

> I've spent another half an hour on it in order to make a new test with
> Flyspell working in my Cygwin Emacs, so that we finally have a full view
> with all data points:
>
> | | Cygwin Emacs 24.5.1 | Windows Emacs 25.0.50.1 |
> |----------------------+---------------------+-------------------------|
> | Flyspell not enabled | OK | OK |
> | Flyspell enabled | OK | ¡¡¡KO!!! |

Sebastien Vauban

unread,
Jun 16, 2015, 10:49:58 AM6/16/15
to emacs...@googlegroups.com
Michael Heerdegen writes:
No, it was with even less parts in play:

- /usr/bin/emacs -Q -l helm-bug.el
for the Cygwin Emacs

- /cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs -Q -l helm-bug.el
for the Windows Emacs

where helm-bug.el is:

--8<---------------cut here---------------start------------->8---
;; Title bar display of visible frames.
(setq frame-title-format
(format "Minimal %s Emacs %s%s of %s - PID: %d"
(capitalize (symbol-name system-type))
emacs-version
(if (and (boundp 'emacs-repository-version)
emacs-repository-version)
(concat " (r"
(replace-regexp-in-string " .*" ""
emacs-repository-version)
")")
"")
(format-time-string "%Y-%m-%d" emacs-build-time)
(emacs-pid)))

(setq ispell-program-name
(cond ((eq system-type 'cygwin)
"/cygdrive/c/Program Files (x86)/Aspell/bin/aspell.exe")
((eq system-type 'windows-nt)
"c:/Program Files (x86)/Aspell/bin/aspell.exe")))

;; Enable on-the-fly spell checking.
(add-hook 'org-mode-hook 'flyspell-mode)

(load-library "~/.emacs.d/elpa/helm-20150614.2253/helm-autoloads.el")
(with-eval-after-load "helm-autoloads"
(global-set-key (kbd "M-y") 'helm-show-kill-ring))
--8<---------------cut here---------------end--------------->8---

Thierry Volpiatto

unread,
Jun 16, 2015, 12:32:43 PM6/16/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> where helm-bug.el is:

You continue using an incorrect configuration so ...

Michael Heerdegen

unread,
Jun 16, 2015, 2:11:12 PM6/16/15
to emacs...@googlegroups.com

> > where helm-bug.el is:
>
> You continue using an incorrect configuration so ...

How can such an Emacs session use Helm at all? It doesn't add anything
to load-path, so if you try to use M-y as described, you'll get an
error.

Michael Heerdegen

unread,
Jun 16, 2015, 2:16:38 PM6/16/15
to emacs...@googlegroups.com

> > where helm-bug.el is:
>
> You continue using an incorrect configuration so ...

Sebastien Vauban

unread,
Jun 16, 2015, 2:56:04 PM6/16/15
to emacs...@googlegroups.com
Michael Heerdegen writes:

>> > where helm-bug.el is:
>>
>> You continue using an incorrect configuration so ...

What is incorrect? To use the full path to Helm? That's to avoid
loading "package".

> How can such an Emacs session use Helm at all? It doesn't add
> anything to load-path, so if you try to use M-y as described, you'll
> get an error.

Did you test it?

I _don't_ understand how I don't get an error, then, as you can see on
the screencast...

I did not invent or fake any of the messages or any part of what's shown
in the recorded session; so I don't understand your assertions because
they don't match what you can see.

There is no Helm in Emacs itself, so how would that work otherwise?

I fully agree, though, that I should have chosen:

--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/.emacs.d/elpa/helm-20150614.2253/")
(load-library "helm-autoloads.el")
--8<---------------cut here---------------end--------------->8---

over:

--8<---------------cut here---------------start------------->8---
(load-library "~/.emacs.d/elpa/helm-20150614.2253/helm-autoloads.el")
--8<---------------cut here---------------end--------------->8---

but I don't think it does change anything to the observed behavior.

Michael Heerdegen

unread,
Jun 16, 2015, 4:55:33 PM6/16/15
to emacs...@googlegroups.com
Sebastien Vauban <sva-...@mygooglest.com>
writes:

> Did you test it?

Yes. I first thought that it won't work. Then I pasted your lines into
a fresh file, making the necessary changes (adopting the path to
helm-autoloads), and tried to reproduce.

> I _don't_ understand how I don't get an error, then, as you can see on
> the screencast...

FWIW, I can't watch it with neither browser here, their site seemingly
doesn't accept the flash player installation on my system. Could watch
it the last time, however. Now I can only load the screenshot.

> I did not invent or fake any of the messages or any part of what's shown
> in the recorded session; so I don't understand your assertions because
> they don't match what you can see.

I don't wanted to blame you to fake anything. But we must exactly know
in which environment you made this test to know where we have to dig, or
how we could try to reproduce.

> There is no Helm in Emacs itself, so how would that work otherwise?
>
> I fully agree, though, that I should have chosen:
>
> (add-to-list 'load-path "~/.emacs.d/elpa/helm-20150614.2253/")
> (load-library "helm-autoloads.el")
>
>
> over:
>
> (load-library "~/.emacs.d/elpa/helm-20150614.2253/helm-autoloads.el")
>
> but I don't think it does change anything to the observed behavior.

We need to be sure that there is no third party or private config stuff
involved in your issue. If I don't understand how helm had been
localized and loaded in your example, I can't be sure. Maybe I'm
overlooking something, I just want to understand it. In my
helm-autoloads.el, there is no path to helm included. Mmh, wait, I
guess you installed Helm via Melpa? Then helm-autoloads includes a
reference to the path.

Anyway, do you feel in position to give debugging yourself with the
Emacs debugger a try? We don't seem to be able to reproduce your
problem, and debugging should be not hard, given you know you to use the
debugger, of course. You would just have to step through the code and
watch until something is called that moves point one char backwards.

FWIW, it's unlikely that there is any obvious error in the helm code
causing this. AFAIKT we only call `insert' to insert the string, that's
it. Probably the error happens due to a problem only appearing with
helm and org and org-table and flyspell used together, dunno. That you
see the bug only in one Emacs installation makes this even stranger.


Regards,

Michael.

Thierry Volpiatto

unread,
Jun 16, 2015, 11:57:20 PM6/16/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> I fully agree, though, that I should have chosen:
>
> --8<---------------cut here---------------start------------->8---
> (add-to-list 'load-path "~/.emacs.d/elpa/helm-20150614.2253/")
> (load-library "helm-autoloads.el")
> --8<---------------cut here---------------end--------------->8---

No.

> over:
>
> --8<---------------cut here---------------start------------->8---
> (load-library "~/.emacs.d/elpa/helm-20150614.2253/helm-autoloads.el")
> --8<---------------cut here---------------end--------------->8---

And NO.

Please use a conventional installation according to the README..

Sebastien Vauban

unread,
Jun 17, 2015, 5:25:38 AM6/17/15
to emacs...@googlegroups.com
Michael Heerdegen writes:
> Sebastien Vauban writes:
>
>> Did you test it?
>
> Yes. I first thought that it won't work. Then I pasted your lines into
> a fresh file, making the necessary changes (adopting the path to
> helm-autoloads), and tried to reproduce.
>
>> I _don't_ understand how I don't get an error, then, as you can see on
>> the screencast...
>
> FWIW, I can't watch it with neither browser here, their site seemingly
> doesn't accept the flash player installation on my system. Could watch
> it the last time, however. Now I can only load the screenshot.
>
>> I did not invent or fake any of the messages or any part of what's shown
>> in the recorded session; so I don't understand your assertions because
>> they don't match what you can see.
>
> I don't wanted to blame you to fake anything.

That's how it sound, as I gave the exact command used, and the exact
init file. Never mind.

> But we must exactly know in which environment you made this test to
> know where we have to dig, or how we could try to reproduce.
>
>> There is no Helm in Emacs itself, so how would that work otherwise?
>>
>> I fully agree, though, that I should have chosen:
>>
>> (add-to-list 'load-path "~/.emacs.d/elpa/helm-20150614.2253/")
>> (load-library "helm-autoloads.el")
>>
>> over:
>>
>> (load-library "~/.emacs.d/elpa/helm-20150614.2253/helm-autoloads.el")
>>
>> but I don't think it does change anything to the observed behavior.
>
> We need to be sure that there is no third party or private config stuff
> involved in your issue.

That's precisely why I've done everything to be able to reproduce it
with "emacs -Q" and just load the minimal config file needed to make the
problem occur ("-l helm-bug.el") within Windows Emacs.

> If I don't understand how helm had been localized and loaded in your
> example, I can't be sure. Maybe I'm overlooking something, I just
> want to understand it. In my helm-autoloads.el, there is no path to
> helm included. Mmh, wait, I guess you installed Helm via Melpa? Then
> helm-autoloads includes a reference to the path.

OK, I understand where your confusion comes from. Yes, I do use Helm
from MELPA.

> Anyway, do you feel in position to give debugging yourself with the
> Emacs debugger a try? We don't seem to be able to reproduce your
> problem, and debugging should be not hard, given you know you to use
> the debugger, of course. You would just have to step through the code
> and watch until something is called that moves point one char
> backwards.
>
> FWIW, it's unlikely that there is any obvious error in the helm code
> causing this. AFAIKT we only call `insert' to insert the string,
> that's it. Probably the error happens due to a problem only appearing
> with helm and org and org-table and flyspell used together, dunno.
> That you see the bug only in one Emacs installation makes this even
> stranger.

I loaded edebug, and instrumented `helm-show-kill-ring' (via C-u C-M-x),
then tried to reproduce my recipe, but I'm already lost with this:

--8<---------------cut here---------------start------------->8---
Debugger entered: nil
edebug--display-1(nil 0 before)
edebug--display(nil 0 before)
edebug-debugger(0 before nil)
edebug-before(0)
(edebug-after (edebug-before 0) 4 (let ((enable-recursive-minibuffers t)) (edebug-after (edebug-before 1) 3 (helm :sources (edebug-after 0 2 helm-source-kill-ring) :buffer "*helm kill ring*" :resume (quote noresume) :allow-nest t))))
(closure (helm-kill-ring-threshold helm-kill-ring-max-lines-number helm-register-max-offset helm-kill-ring-map helm-source-kill-ring helm-source-mark-ring helm-source-global-mark-ring helm-source-register t) nil (edebug-after (edebug-before 0) 4 (let ((enable-recursive-minibuffers t)) (edebug-after (edebug-before 1) 3 (helm :sources (edebug-after 0 2 helm-source-kill-ring) :buffer "*helm kill ring*" :resume (quote noresume) :allow-nest t)))))()
edebug-enter(helm-show-kill-ring nil (closure (helm-kill-ring-threshold helm-kill-ring-max-lines-number helm-register-max-offset helm-kill-ring-map helm-source-kill-ring helm-source-mark-ring helm-source-global-mark-ring helm-source-register t) nil (edebug-after (edebug-before 0) 4 (let ((enable-recursive-minibuffers t)) (edebug-after (edebug-before 1) 3 (helm :sources (edebug-after 0 2 helm-source-kill-ring) :buffer "*helm kill ring*" :resume (quote noresume) :allow-nest t))))))
edebug-enter(helm-show-kill-ring nil (closure (helm-kill-ring-threshold helm-kill-ring-max-lines-number helm-register-max-offset helm-kill-ring-map helm-source-kill-ring helm-source-mark-ring helm-source-global-mark-ring helm-source-register t) nil (edebug-after (edebug-before 0) 4 (let ((enable-recursive-minibuffers t)) (edebug-after (edebug-before 1) 3 (helm :sources (edebug-after 0 2 helm-source-kill-ring) :buffer "*helm kill ring*" :resume (quote noresume) :allow-nest t))))))
helm-show-kill-ring()
funcall-interactively(helm-show-kill-ring)
call-interactively(helm-show-kill-ring nil nil)
command-execute(helm-show-kill-ring)
--8<---------------cut here---------------end--------------->8---

Do you understand what's wrong with Edebug?

Sebastien Vauban

unread,
Jun 17, 2015, 5:44:07 AM6/17/15
to emacs...@googlegroups.com
Thierry Volpiatto writes:
> Please use a conventional installation according to the README..

That's how you want me to load it?

--8<---------------cut here---------------start------------->8---
> emacs-helm.sh -P /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs -l helm-bug.el
emacs-helm.sh: line 96: /cygdrive/c/Program: No such file or directory

> emacs-helm.sh -P "/cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
emacs-helm.sh: line 96: /cygdrive/c/Program\: No such file or directory
--8<---------------cut here---------------end--------------->8---

Can't get it launched...

Sebastien Vauban

unread,
Jun 17, 2015, 6:19:38 AM6/17/15
to emacs...@googlegroups.com
Sebastien Vauban writes:
> Thierry Volpiatto writes:
>> Please use a conventional installation according to the README..
>
> That's how you want me to load it?
>
>> emacs-helm.sh -P /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs -l helm-bug.el
> emacs-helm.sh: line 96: /cygdrive/c/Program: No such file or directory
>
>> emacs-helm.sh -P "/cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
> emacs-helm.sh: line 96: /cygdrive/c/Program\: No such file or directory
>
> Can't get it launched...

FYI, moving Windows Emacs executables to a path without spaces does not
help much (as you can see at http://screencast.com/t/bp5l0PQto):

command-line-1: Cannot open load file: No such file or directory, /tmp/helm-cfg.el

Michael Heerdegen

unread,
Jun 17, 2015, 7:34:47 AM6/17/15
to emacs...@googlegroups.com
Sebastien Vauban <sva-...@mygooglest.com>
writes:

> That's precisely why I've done everything to be able to reproduce it
> with "emacs -Q" and just load the minimal config file needed to make the
> problem occur ("-l helm-bug.el") within Windows Emacs.

Ok. Nonetheless it would be better to rely on emacs-help.sh, if you get
that working. Can't help with that on Windows, however.

> I loaded edebug, and instrumented `helm-show-kill-ring' (via C-u C-M-x),
> then tried to reproduce my recipe, but I'm already lost with this:
>
> Debugger entered: nil
> [...]
>
> Do you understand what's wrong with Edebug?

Edebug is not suitable for debugging Helm. If there is minibuffer input
or the selected window changes and such things, it often just gets
confused.

Better use the built in debugger here. You can still use Edebug for
single functions, but for this problem, you won't get lucky if you rely
on it completely.

Thierry Volpiatto

unread,
Jun 17, 2015, 9:52:31 AM6/17/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> Thierry Volpiatto writes:
>> Please use a conventional installation according to the README..
>
> That's how you want me to load it?
>
> --8<---------------cut here---------------start------------->8---
>> emacs-helm.sh -P /cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs -l helm-bug.el
> emacs-helm.sh: line 96: /cygdrive/c/Program: No such file or directory
>
>> emacs-helm.sh -P "/cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
> emacs-helm.sh: line 96: /cygdrive/c/Program\: No such file or directory
> --8<---------------cut here---------------end--------------->8---

Even worst.

Michael Heerdegen

unread,
Jun 17, 2015, 2:54:35 PM6/17/15
to emacs...@googlegroups.com
Thierry Volpiatto
<thierry....@gmail.com> writes:

> Sebastien Vauban <sva-...@mygooglest.com>
> writes:
>
> > Thierry Volpiatto writes:
> >> Please use a conventional installation according to the README..
> >
> > That's how you want me to load it?
> >
> > --8<---------------cut here---------------start------------->8---
> >> emacs-helm.sh -P /cygdrive/c/Program Files
> >> (x86)/emacs-trunk/bin/emacs -l helm-bug.el
> > emacs-helm.sh: line 96: /cygdrive/c/Program: No such file or directory
> >
> >> emacs-helm.sh -P "/cygdrive/c/Program\ Files\
> >> \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
> > emacs-helm.sh: line 96: /cygdrive/c/Program\: No such file or directory
> > --8<---------------cut here---------------end--------------->8---
>
> Even worst.

@Sebastien: you should either put the path to the emacs binary inside
"quotes" or quote the space chars with backslashes, both not do both at
the same time.

Do you need to specify -P at all (it's optional)?

@Thierry: not sure what else could have become worse. BTW, in the
emacs-helm usage string, what does the [} brackets mean, what's the
difference to []?

Michael.

Sebastien Vauban

unread,
Jun 17, 2015, 3:03:42 PM6/17/15
to emacs...@googlegroups.com
Michael Heerdegen writes:
> Thierry Volpiatto writes:
>> Sebastien Vauban writes:
>> > Thierry Volpiatto writes:
>> >> Please use a conventional installation according to the README..
>> >
>> > That's how you want me to load it?
>> >
>> > --8<---------------cut here---------------start------------->8---
>> >> emacs-helm.sh -P /cygdrive/c/Program Files
>> >> (x86)/emacs-trunk/bin/emacs -l helm-bug.el
>> > emacs-helm.sh: line 96: /cygdrive/c/Program: No such file or directory
>> >
>> >> emacs-helm.sh -P "/cygdrive/c/Program\ Files\
>> >> \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
>> > emacs-helm.sh: line 96: /cygdrive/c/Program\: No such file or directory
>> > --8<---------------cut here---------------end--------------->8---
>>
>> Even worst.
>
> @Sebastien: you should either put the path to the emacs binary inside
> "quotes" or quote the space chars with backslashes, both not do both at
> the same time.

I pasted my first 2 trials, but, looking back at my history, I've tried
almost all I could think of, and none succeedeed:

--8<---------------cut here---------------start------------->8---
985 emacs-helm.sh -P /cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs -l helm-bug.el
986 emacs-helm.sh -P "/cygdrive/c/Program\ Files\ \(x86\)/emacs-trunk/bin/emacs" -l helm-bug.el
987 emacs-helm.sh -P "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs" -l helm-bug.el
988 emacs-helm.sh -P $(cygwin -d "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs") -l helm-bug.el
992 emacs-helm.sh -P $(cygpath -d "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs") -l helm-bug.el
993 emacs-helm.sh -P $(cygpath -m "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs") -l helm-bug.el
994 emacs-helm.sh -P $(cygpath -u "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs") -l helm-bug.el
995 emacs-helm.sh -P $(cygpath -w "/cygdrive/c/Program Files (x86)/emacs-trunk/bin/emacs") -l helm-bug.el
--8<---------------cut here---------------end--------------->8---

> Do you need to specify -P at all (it's optional)?

Yes, that's the point: to demo the bug, I need to use Windows Emacs, not
Cygwin Emacs.

If I don't use `-P', then "emacs" is found as being /usr/bin/emacs, the
Cygwin Emacs, which does not have the problem.

Thierry Volpiatto

unread,
Jun 17, 2015, 3:49:00 PM6/17/15
to emacs...@googlegroups.com

Michael Heerdegen <michael_...@web.de> writes:

> @Thierry: not sure what else could have become worse.

The -l helm-bug.el which try to load non--sense code.
Anyway I have installed a window on vbox with aspell and emacs and could
reproduce the bug, was faster than trying to understand all these tests.
It is not a helm bug but a flyspell-mode bug IMO.
(I think flyspell is modifying the mark or something, or the code it use
is not supported on this platform.)

Disabling flyspell before running the helm kill-ring fix the problem.
But I will not commit this, our code works fine on sane systems.

--8<---------------cut here---------------start------------->8---
(defun helm-show-kill-ring ()
"Preconfigured `helm' for `kill-ring'.
It is drop-in replacement of `yank-pop'.

First call open the kill-ring browser, next calls move to next line."
(interactive)
(let ((enable-recursive-minibuffers t)
(fly-state (with-helm-current-buffer
(and (boundp 'flyspell-mode)
(if flyspell-mode 1 -1)))))
(and fly-state (flyspell-mode -1))
(unwind-protect
(helm :sources helm-source-kill-ring
:buffer "*helm kill ring*"
:resume 'noresume
:allow-nest t)
(with-helm-current-buffer
(run-with-idle-timer 0.01 nil
(lambda ()
(and fly-state (flyspell-mode fly-state))))))))
--8<---------------cut here---------------end--------------->8---


> BTW, in the emacs-helm usage string, what does the [} brackets mean,
> what's the difference to []?

Don't remember.

Thierry Volpiatto

unread,
Jun 17, 2015, 3:51:56 PM6/17/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> I pasted my first 2 trials, but, looking back at my history, I've tried
> almost all I could think of, and none succeedeed:

Use single quotes to quote your path to emacs and stop trying to load
your buggy file helm-bug.el which contain non-sense code.

Thierry Volpiatto

unread,
Jun 18, 2015, 12:42:38 AM6/18/15
to emacs...@googlegroups.com

Should be fixed now by 890a1b0.
It seems run-with-timer is not working properly on windows.

Sebastien Vauban

unread,
Jun 19, 2015, 7:59:50 AM6/19/15
to emacs...@googlegroups.com
Hello Thierry,

Thierry Volpiatto writes:
> Should be fixed now by 890a1b0.
> It seems run-with-timer is not working properly on windows.

Thanks A LOT for having thoroughly looked into this!

Do you mean that with the `run-with-timer' change, I don't need anymore
the code which disables Flyspell in Windows Emacs?

Thierry Volpiatto

unread,
Jun 19, 2015, 8:59:33 AM6/19/15
to emacs...@googlegroups.com

Sebastien Vauban <sva-...@mygooglest.com> writes:

> Hello Thierry,
>
> Thierry Volpiatto writes:
>> Should be fixed now by 890a1b0.
>> It seems run-with-timer is not working properly on windows.
>
> Thanks A LOT for having thoroughly looked into this!
>
> Do you mean that with the `run-with-timer' change, I don't need anymore
> the code which disables Flyspell in Windows Emacs?

Yes. Tested on emacs-24.5 on Windows7 in Vbox.

Sebastien Vauban

unread,
Jun 19, 2015, 9:32:57 AM6/19/15
to emacs...@googlegroups.com
Thierry Volpiatto writes:
> Sebastien Vauban writes:
>> Thierry Volpiatto writes:
>>> Should be fixed now by 890a1b0.
>>> It seems run-with-timer is not working properly on windows.
>>
>> Thanks A LOT for having thoroughly looked into this!
>>
>> Do you mean that with the `run-with-timer' change, I don't need anymore
>> the code which disables Flyspell in Windows Emacs?
>
> Yes. Tested on emacs-24.5 on Windows7 in Vbox.

Confirmed within a new Windows Emacs session, and without the patch you
sent.

Thanks a lot again.
Reply all
Reply to author
Forward
0 new messages