all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to customize shell prompt (for emacs tramp compatibility)
@ 2018-12-13 17:32 Giovanni Biscuolo
  2018-12-13 21:07 ` George Clemmer
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Biscuolo @ 2018-12-13 17:32 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Hi,

I'm having problems to remotely browse my guixsd testing host using
emacs dired via tramp, the exact error message I get is:

--8<---------------cut here---------------start------------->8---
tramp-file-name-handler: Couldn’t find a proper ‘ls’ command
--8<---------------cut here---------------end--------------->8---

I found this explanation on stackexchange
https://stackoverflow.com/questions/6954479/emacs-tramp-doesnt-work/8363532#8363532

actually PS1 is \u@\h \w\$, it should be \u@\h:\w\$ to be "tramp
compatible"

please is there a way to declaratively customize user prompts in
config.scm or similar?

should that "unusual" prompt considered a bug to be fixed? [1]

best regards
Gio


[1] I'm going where it's defined and try to propose a patch in guix-devel


-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: how to customize shell prompt (for emacs tramp compatibility)
  2018-12-13 17:32 how to customize shell prompt (for emacs tramp compatibility) Giovanni Biscuolo
@ 2018-12-13 21:07 ` George Clemmer
  2018-12-14 15:14   ` Giovanni Biscuolo
  0 siblings, 1 reply; 3+ messages in thread
From: George Clemmer @ 2018-12-13 21:07 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: help-guix


Giovanni Biscuolo <g@xelera.eu> writes:

> I'm having problems to remotely browse my guixsd testing host using
> emacs dired via tramp, the exact error message I get is:
>
> --8<---------------cut here---------------start------------->8---
> tramp-file-name-handler: Couldn’t find a proper ‘ls’ command
> --8<---------------cut here---------------end--------------->8---

FWIW, on macOS running GNU Emacs 26.1 from brew I load this once ...

--8<---------------cut here---------------start------------->8---
;; Make tramp work from macOS to GuixSD
(require 'tramp)
(setq tramp-remote-path
      (append tramp-remote-path
	      '(tramp-own-remote-path)))
(setq tramp-remote-path
      (append tramp-remote-path
	      '("~/.guix-profile/bin" "~/.guix-profile/sbin"
		"/run/current-system/profile/bin" "/run/current-system/profile/sbin")))
--8<---------------cut here---------------end--------------->8---

The net effect ends up cached on the mac in ~/.emacs.d/tramp ...

--8<---------------cut here---------------start------------->8---
;; -*- emacs-lisp -*-
;; Tramp connection history.  Don't change this file.
;; You can delete it, forcing Tramp to reapply the checks.

(((tramp-file-name "ssh" "glc" nil "g1" nil nil nil)
  ("uname" "Linux 4.19.0-gnu")
  ("locale" "LC_ALL=C")
  ("test" "test")
  ("remote-path"
   ("/bin"))
  ("remote-shell" "/bin/sh")
  ("~" "/home/glc")
  ("file-exists" "test -e")
  ("case-insensitive" nil)
  ("ls" "/run/current-system/profile/bin/ls --color=never")
  ("ls-quoting-style" t)
  ("ls-dired" t)
  ("stat" nil)
  ("perl" nil)
  ("id" "/run/current-system/profile/bin/id")
  ("gid-integer" 998)))
--8<---------------cut here---------------end--------------->8---

... after which tramp works fine.

HTH - George

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

* Re: how to customize shell prompt (for emacs tramp compatibility)
  2018-12-13 21:07 ` George Clemmer
@ 2018-12-14 15:14   ` Giovanni Biscuolo
  0 siblings, 0 replies; 3+ messages in thread
From: Giovanni Biscuolo @ 2018-12-14 15:14 UTC (permalink / raw)
  To: George Clemmer; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

Hi!

George Clemmer <myglc2@gmail.com> writes:

[...]

> --8<---------------cut here---------------start------------->8---
> ;; Make tramp work from macOS to GuixSD
> (require 'tramp)
> (setq tramp-remote-path
>       (append tramp-remote-path
> 	      '(tramp-own-remote-path)))
> (setq tramp-remote-path
>       (append tramp-remote-path
> 	      '("~/.guix-profile/bin" "~/.guix-profile/sbin"
> 		"/run/current-system/profile/bin" "/run/current-system/profile/sbin")))
> --8<---------------cut here---------------end--------------->8---

great, it worked! (I'm on Debian, so it's cross OS ;-) )

> The net effect ends up cached on the mac in ~/.emacs.d/tramp ...
>
> --8<---------------cut here---------------start------------->8---

[...]

>   ("ls" "/run/current-system/profile/bin/ls --color=never")

[...]

> --8<---------------cut here---------------end--------------->8---

the same here: with the above tramp-remote-path definition, it found a
proper ls on the remote guix(SD) host

thank you very much!
happy hacking!
Gio

P.S.: from an "old school" sysadmin with FHS printed in every neuron,
guix is a mind blowing and refreshing experience :-)

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2018-12-14 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 17:32 how to customize shell prompt (for emacs tramp compatibility) Giovanni Biscuolo
2018-12-13 21:07 ` George Clemmer
2018-12-14 15:14   ` Giovanni Biscuolo

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.