Cygwin Emacs and ^M at the end of file names for Helm-locate (via the Windows "es.exe")

38 views
Skip to first unread message

user3...@gmail.com

unread,
Apr 30, 2016, 3:34:42 PM4/30/16
to emacs-helm
Hello,

I'm using Cygwin Emacs on Win 10. And I've installed the Windows Everything program for the Helm-locate facility.

It somehow works, files are found, but all their names are suffixed with a "^M" character. Hence, they can't be opened, because Emacs doesn't find those files in fine.

How can I remove those ^M chars?

I've tried all the combinations of:

    (add-to-list 'process-coding-system-alist
                 '("es" . (undecided-dos . undecided-unix)))

(I mean dos/unix, unix/dos, unix/unix and dos/dos)

but none worked.

How can we fix this?

Best regards!

Thierry Volpiatto

unread,
May 1, 2016, 12:45:23 AM5/1/16
to emacs...@googlegroups.com
My knowledge of Windows is limited, but isn't cygwin an emulation of
linux ? In this case the shell used is a bash shell and you are running
a program (es aka everything) which is designed to work on a dos
environment.
So I guess that if you use emacs directly on windows, you should use es otherwise
locate.

--
Thierry

user3...@gmail.com

unread,
May 2, 2016, 10:47:49 AM5/2/16
to emacs-helm
The thing is that "locate" is not straight to set up on Cygwin, but moreover it's way slower that Everything: it knows about changes after a full rescan, while Everything is aware of changes (files added, renamed or moved) as soon as those changes happen. It's much more efficient.

And the only problem is that files are shown as (for the "test" pattern):

    C:\Boot\memtest.exe^M
    C:\cygwin64\bin\test.exe^M
    ...
 
So the problem seems pretty trivial (removing spurious ^M characters in a clever way, like the process-coding-alist thingie), though well above my knowledge in Helm and character conversions.

I'm pretty sure someone has tackled this already, nope?

Best regards!

Thierry Volpiatto

unread,
May 4, 2016, 1:02:35 AM5/4/16
to emacs...@googlegroups.com

user3...@gmail.com writes:

> The thing is that "locate" is not straight to set up on Cygwin, but
> moreover it's way slower that Everything: it knows about changes after
> a full rescan, while Everything is aware of changes (files added,
> renamed or moved) as soon as those changes happen. It's much more
> efficient.
>
> And the only problem is that files are shown as (for the "test" pattern):
>
> C:\Boot\memtest.exe^M
> C:\cygwin64\bin\test.exe^M
> ...
>
> So the problem seems pretty trivial (removing spurious ^M characters
> in a clever way, like the process-coding-alist thingie), though well
> above my knowledge in Helm and character conversions.
>
> I'm pretty sure someone has tackled this already, nope?

As I said it is not an helm problem, there is nothing to fix in helm
here, you have to find what's wrong with the shell you are using in
emacs and the programs you want to use (in our case es.exe).

--
Thierry
Reply all
Reply to author
Forward
0 new messages