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

38 vues
Accéder directement au premier message non lu

user3...@gmail.com

non lue,
30 avr. 2016, 15:34:4230/04/2016
à 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

non lue,
1 mai 2016, 00:45:2301/05/2016
à 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

non lue,
2 mai 2016, 10:47:4902/05/2016
à 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

non lue,
4 mai 2016, 01:02:3504/05/2016
à 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
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message