Possible Eshell/Tramp Bug in Emacs 26

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible Eshell/Tramp Bug in Emacs 26

Jay Kamat
Hi!

I'm not entirely sure if this is a problem on my end or not, so just to
be safe, I'm sending this to help-gnu-emacs rather than emacs-devel, if
this is an actual bug, feel free to forward this there.

On emacs 25:

1. Start emacs -Q
2. Evaluate (require 'em-tramp)
3. M-x eshell
4. run 'sudo ls'
5. after logging in via tramp, output of ls is displayed correctly

On emacs 26 (d24ec5854098841388dfecf2c668e7f48f348af0):

1. Start emacs -Q
2. Evaluate (require 'em-tramp)
3. M-x eshell
4. run 'sudo ls'
5. after logging in via tramp, output of ls is:

'ls: No such file or directory'.

Can anyone else reproduce this as well, or is this just me (or has there
been a relevant recent change)? I can try to bisect this if that would
be useful.

Thanks,
-Jay

Reply | Threaded
Open this post in threaded view
|

Re: Possible Eshell/Tramp Bug in Emacs 26

Jay Kamat
It seems that the fix to
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27954 (commit
e66e81679c3c91d6bf8f62c7abcd968430b4d1fe) caused this issue. I had an
eshell alias defined as

alias sudo eshell/sudo $*

Which seems to no longer work (with the error described).

Now, the entry:

alias sudo eshell/sudo

works for my purposes instead.

This is a little bit annoying since it means that I can't share these
aliases across emacs25 and emacs26 without problems. One solution I
could do is setting `eshell-prefer-lisp-functions' instead of using this
alias, but I would have liked to only override sudo (and leave the rest
as system). If anyone knows a better solution, let me know!

Also, it would be nice if eshell aliases and other configuration were
not loaded in an emacs -Q setting.

-Jay

Reply | Threaded
Open this post in threaded view
|

Re: Possible Eshell/Tramp Bug in Emacs 26

Michael Albinus
Jay Kamat <[hidden email]> writes:

Hi Jay,

> It seems that the fix to
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27954 (commit
> e66e81679c3c91d6bf8f62c7abcd968430b4d1fe) caused this issue. I had an
> eshell alias defined as
>
> alias sudo eshell/sudo $*
>
> Which seems to no longer work (with the error described).

There's also bug#28320, which seems to report the same problem.

> Now, the entry:
>
> alias sudo eshell/sudo
>
> works for my purposes instead.
>
> This is a little bit annoying since it means that I can't share these
> aliases across emacs25 and emacs26 without problems. One solution I
> could do is setting `eshell-prefer-lisp-functions' instead of using this
> alias, but I would have liked to only override sudo (and leave the rest
> as system). If anyone knows a better solution, let me know!
>
> Also, it would be nice if eshell aliases and other configuration were
> not loaded in an emacs -Q setting.

Noam, could you have a look on this?

> -Jay

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling (Was: Possible Eshell/Tramp Bug in Emacs 26)

Noam Postavsky-2

> Jay Kamat <[hidden email]> writes:
>>
>> This is a little bit annoying since it means that I can't share these
>> aliases across emacs25 and emacs26 without problems. One solution I
>> could do is setting `eshell-prefer-lisp-functions' instead of using this
>> alias, but I would have liked to only override sudo (and leave the rest
>> as system). If anyone knows a better solution, let me know!

Another possible alternative is adding "sudo" to
`eshell-complex-commands' (adding `eshell-tramp' to
`eshell-modules-list' does this, see `eshell-tramp-initialize').

    eshell-complex-commands is a variable defined in ‘esh-cmd.el’.
    Its value is ("ls")

      This variable may be risky if used as a file-local variable.

    Documentation:
    A list of commands names or functions, that determine complexity.
    That is, if a command is defined by a function named eshell/NAME,
    and NAME is part of this list, it is invoked as a complex command.
    Complex commands are always correct, but run much slower.  If a
    command works fine without being part of this list, then it doesn’t
    need to be.

    If an entry is a function, it will be called with the name, and should
    return non-nil if the command is complex.

    You can customize this variable.

>> Also, it would be nice if eshell aliases and other configuration were
>> not loaded in an emacs -Q setting.

Yes, that would make sense too.