unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5840: 24.0.50; wrong tramp-file-name-regexp
@ 2010-04-06  6:06 Thierry Volpiatto
  2010-04-11 16:54 ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Thierry Volpiatto @ 2010-04-06  6:06 UTC (permalink / raw)
  To: 5840

Hi,
with these settings:

,----
| (add-hook 'minibuffer-setup-hook
|           (lambda () (add-hook 'post-command-hook
|                                'minibuffer-completion-help nil t)))
`----

If you do:
C-x C-f ==> /su:

You have not the time to type the second ":" and tramp fail.
(same for ssh/ftp)

This could be fixed by modifying tramp-file-name-regexp like this:

(tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:")

This is what does anything-find-files-get-candidates in anything-config.el
You will find it at:
http://repo.or.cz/w/anything-config.git


In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
 of 2010-04-01 on tux
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure  '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=i686 -pipe -O2' 'LDFLAGS=-Wl,-O1''

Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: C
  value of $LC_CTYPE: fr_FR.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  global-undo-tree-mode: t
  undo-tree-mode: t
  delete-selection-mode: t
  minibuffer-depth-indicate-mode: t
  auto-image-file-mode: t
  shell-dirtrack-mode: t
  partial-completion-mode: t
  show-paren-mode: t
  display-battery-mode: t
  display-time-mode: t
  diff-auto-refine-mode: t
  savehist-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f C-. C-. C-. <return> C-x C-f l a b o C-j C-x 
C-f C-. C-. d o w <down> C-j <up> <up> C-c b <down> 
<down> <return> <down> <down> <down> C-x k <return> 
C-z p C-c b <down> <return> <down> <down> <down> <down> 
<tab> <down> <down> <down> <down> <down> <down> <up> 
<up> <up> <up> C-SPC C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n M-w C-z l <down> <down> <return> M-x r 
e p o r t - e m <down> <up> <return>

Recent messages:
Desktop lazily opening comilog_cite_cadres_1987_1b.jpg (1 remaining)...
Type C-c C-c to view the image as text.
Desktop lazily opening comilog_cite_cadres_1987_1b.jpg (1 remaining)...done
Lazy desktop load complete
 [3 times]
Auto-saving...done
Collecting symbols...done
SUBTREE (NO CHILDREN)
Mark set
 [2 times]

Load-path shadows:
/usr/share/emacs/site-lisp/dictionary/lpath hides /usr/share/emacs/site-lisp/emacs-wget/lpath
/home/thierry/elisp/lua-mode/lua-mode hides /usr/share/emacs/site-lisp/lua-mode/lua-mode
~/elisp/g-client/json hides /usr/share/emacs/24.0.50/lisp/json
/usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/24.0.50/lisp/hex-util
/usr/share/emacs/site-lisp/flim/sha1 hides /usr/share/emacs/24.0.50/lisp/sha1
/usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/24.0.50/lisp/md4
/usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/24.0.50/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/24.0.50/lisp/net/hmac-def
/usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.0.50/lisp/net/sasl-digest
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/24.0.50/lisp/net/sasl
/usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.0.50/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.0.50/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.0.50/lisp/net/sasl-ntlm
/home/thierry/elisp/emms/lisp/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq

Features:
(shadow gnus-cite gnus-demon gnus-namazu gnus-dired nnshimbun shimbun
luna eword-encode eword-decode std11 mel path-util mime-def mcharset
mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom poe gnus-bcklg spam
spam-stat gnus-uu yenc gnus-alias mail-extr gnus-msg emacsbug conf-mode
newcomment sh-script view vc-rcs xhg-dvc xhg xhg-annotate xhg-mq xhg-log
tla smerge-mode dvc-state dvc-config dvc-diff dvc-fileinfo diff
dvc-cmenu dvc-about dvc-version dvc-revlist uniquify align-let bzr-core
cg-core xdarcs-core xgit-core xhg-core xmtn-minimal server
el-expectations el-mock csv2org iedit eieio zop-to-char wave-list
wave-display wave-client json netrc g g-cus-load elscreen-server
elscreen-dired elscreen-w3m mule-util alist pym static apel-ver product
elscreen undo-tree smallurl mm-url xml-weather rectangle-utils windmove
sdcv woof screenshot auto-document eiv tv-utils eldoc pcvs pcvs-parse
pcvs-info pcvs-defs showtip delsel init-anything-thierry
descbinds-anything anything-ipython ipython executable anything-grep
grep anything-dabbrev-expand dabbrev shell-history anything-complete
anything-show-completion anything-etags anything-match-plugin etags
anything-traverse anything-delicious anything-mercurial anything-config
w3m-bookmark rx anything firefox-protocol bookmark-firefox-handler
bookmark-extensions bookmark install-elisp find-func mb-depth autodoc
ioccur traverselisp thumb-page moz stumpwm-mode cl-info slime-banner
slime-tramp slime-asdf slime-fancy slime-fontifying-fu slime-package-fu
slime-references slime-xref-browser slime-scratch slime-presentations
slime-highlight-edits slime-fuzzy slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-parse slime-repl slime
apropos hideshow hyperspec thingatpt slime-autoloads bbdb-autoloads
bbdb-gui bbdb-com bbdb boxquote rect image-file tramp-imap tramp-gw
tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell
tramp-compat trampver complete newsticker newst-treeview tree-widget
newst-plainview newst-reader newst-ticker newst-backend ledger pcomplete
esh-arg esh-util extview lpr woman man assoc two-column shell-command
em-term term ehelp electric esh-toggle em-xtra dirtrack flymake pdbtrack
pycomplete python-mode info-look ansi-color pymacs no-word regex-tool
whitespace htmlfontify text-translator-load paren battery time dired-tar
compile comint dired-extension image-dired dired-details yaoddmuse
skeleton sgml-mode emms-mpd-config emms-playlist-limit emms-volume
emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-lastfm-client emms-cue
emms-mode-line-icon emms-browser sort emms-playlist-sort
emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time
emms-lyrics emms-url emms-tag-editor emms-mark emms-mode-line emms-cache
emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc
emms-player-mplayer emms-info emms-streams later-do emms-source-playlist
emms-source-file emms-player-simple emms-setup emms emms-compat winner
dvc-init bzr-gnus tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015
mm-view smime password-cache dig dvc-gnus tla-core pp tla-autoconf
tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips dired-x dired-aux
ffap ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui
dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn log-edit
ring pcvs-util add-log diff-mode lisppaste-extension lisppaste xml-rpc
url-http tls url-auth url-gw xml htmlize-hack htmlize muse-colors
muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html
muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish
muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode
muse-autoloads org-config-thierry cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp org-exp-blocks org-info org-gnus org-bibtex org-bbdb
org-agenda appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs
org-annotation-helper url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-util url-parse url-vars mailcap remember
org-remember org-datetree org byte-opt bytecomp byte-compile
org-footnote org-src org-list org-faces org-compat org-macs noutline
outline config-w3m w3m browse-url doc-view jka-compr image-mode timezone
w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc
w3m-util mime-w3m w3m-load savehist epa-file epa derived epg epg-config
auth-source dired gnus-async nntp gnus-sum nnoo gnus-group time-date
gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int
gnus-range message sendmail regexp-opt rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader
gnus-util mail-utils mm-util mail-prsvr wid-edit info easymenu
usage-memo desktop midnight punycode idna mybest-theme edmacro kmacro
eev-thierry iterator eev-all eev-mini-steps eev-browse-url eev-langs
eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev
easy-mmode advice help-fns advice-preload cl cl-19 site-gentoo w3m-wget
preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
font-render-setting gtk x-toolkit x multi-tty emacs)

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-06  6:06 bug#5840: 24.0.50; wrong tramp-file-name-regexp Thierry Volpiatto
@ 2010-04-11 16:54 ` Michael Albinus
  2010-04-11 18:53   ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-11 16:54 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 5840

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Hi,

Hi,

> with these settings:
>
> ,----
> | (add-hook 'minibuffer-setup-hook
> |           (lambda () (add-hook 'post-command-hook
> |                                'minibuffer-completion-help nil t)))
> `----
>
> If you do:
> C-x C-f ==> /su:
>
> You have not the time to type the second ":" and tramp fail.
> (same for ssh/ftp)
>
> This could be fixed by modifying tramp-file-name-regexp like this:
>
> (tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:")

This would be wrong. "/hostname:/path" is a valid remote file name, which
would not be catched by your regexp.

(For the records, I also dislike Tramp's syntactic ambiguity. But this is
history, I guess we cannot change it anymore.)

In order to fix this problem, one could tweak `minibuffer-completion-predicate'
in `minibuffer-completion-help', which is `file-exists-p' in the given
case.

Best regards, Michael.






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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-11 16:54 ` Michael Albinus
@ 2010-04-11 18:53   ` Stefan Monnier
  2010-04-11 20:12     ` Thierry Volpiatto
  2010-04-12  4:41     ` Michael Albinus
  0 siblings, 2 replies; 26+ messages in thread
From: Stefan Monnier @ 2010-04-11 18:53 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 5840, Thierry Volpiatto

>> with these settings:
>> 
>> ,----
>> | (add-hook 'minibuffer-setup-hook
>> |           (lambda () (add-hook 'post-command-hook
>> |                                'minibuffer-completion-help nil t)))
>> `----
>> 
>> If you do:
>> C-x C-f ==> /su:
>> 
>> You have not the time to type the second ":" and tramp fail.
>> (same for ssh/ftp)

While I do get a Tramp failure, indeed, this does not prevent me from
typing the second :.  I think the problem is more that the Tramp error
is very loud and makes you think it's the end of the world, whereas in
reality Emacs is still there waiting for you keep on typing.

>> This could be fixed by modifying tramp-file-name-regexp like this:
>> (tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:")
> This would be wrong. "/hostname:/path" is a valid remote file name, which
> would not be catched by your regexp.
> (For the records, I also dislike Tramp's syntactic ambiguity. But this is
> history, I guess we cannot change it anymore.)

Everything can be changed.

> In order to fix this problem, one could tweak
> `minibuffer-completion-predicate' in `minibuffer-completion-help',
> which is `file-exists-p' in the given case.

I think we somehow need to make the error a bit more quiet.
Most of it needs to be done on Tramp's side, but maybe we can help it by
having the completion code warn Tramp that this is only used
for completion.  Or maybe the completion code can catch the error and
just display it calmly.

I wonder, tho: why is Tramp so loud?  Shouldn't it just call `signal'
with appropriate parameters to indicate an error, without popping up
any window?


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-11 18:53   ` Stefan Monnier
@ 2010-04-11 20:12     ` Thierry Volpiatto
  2010-04-12  5:20       ` Michael Albinus
  2010-04-12  4:41     ` Michael Albinus
  1 sibling, 1 reply; 26+ messages in thread
From: Thierry Volpiatto @ 2010-04-11 20:12 UTC (permalink / raw)
  To: bug-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> with these settings:
>>> 
>>> ,----
>>> | (add-hook 'minibuffer-setup-hook
>>> |           (lambda () (add-hook 'post-command-hook
>>> |                                'minibuffer-completion-help nil t)))
>>> `----
>>> 
>>> If you do:
>>> C-x C-f ==> /su:
>>> 
>>> You have not the time to type the second ":" and tramp fail.
>>> (same for ssh/ftp)
>
> While I do get a Tramp failure, indeed, this does not prevent me from
> typing the second :.  I think the problem is more that the Tramp error
> is very loud and makes you think it's the end of the world, whereas in
> reality Emacs is still there waiting for you keep on typing.
>
>>> This could be fixed by modifying tramp-file-name-regexp like this:
>>> (tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:")
>> This would be wrong. "/hostname:/path" is a valid remote file name, which
>> would not be catched by your regexp.

I didn't know and never use /hostname:, i always prefix it with method
(e.g ssh).

So i end up to this problem in anything by systematically translating
path like /su:: /sudo:: or /hostname: by:

/su:hostname:
/sudo:hostname:
/ssh:hostname:

To achieve that i use (in a let) to avoid connecting before the second
":":

(tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:?")

And i translate the matched string in the path with:

,----
| (defun anything-create-tramp-name (fname)
|   "Build filename for `anything-pattern' \
| like /su::, /sudo:: or /hostname:."
|   (apply #'tramp-make-tramp-file-name
|          (loop
|             with v = (tramp-dissect-file-name fname)
|             for i across v collect i)))
`----



>> (For the records, I also dislike Tramp's syntactic ambiguity. But this is
>> history, I guess we cannot change it anymore.)
>
> Everything can be changed.
>
>> In order to fix this problem, one could tweak
>> `minibuffer-completion-predicate' in `minibuffer-completion-help',
>> which is `file-exists-p' in the given case.
>
> I think we somehow need to make the error a bit more quiet.
> Most of it needs to be done on Tramp's side, but maybe we can help it by
> having the completion code warn Tramp that this is only used
> for completion.  Or maybe the completion code can catch the error and
> just display it calmly.

And/Or always translate like above to avoid as much as possible errors.

> I wonder, tho: why is Tramp so loud?  Shouldn't it just call `signal'
> with appropriate parameters to indicate an error, without popping up
> any window?
>
>
>         Stefan
>
>
>
>
>
>

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-11 18:53   ` Stefan Monnier
  2010-04-11 20:12     ` Thierry Volpiatto
@ 2010-04-12  4:41     ` Michael Albinus
  2010-04-12 15:14       ` Thierry Volpiatto
  1 sibling, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-12  4:41 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5840, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> (For the records, I also dislike Tramp's syntactic ambiguity. But this is
>> history, I guess we cannot change it anymore.)
>
> Everything can be changed.

Maybe we can discuss it in another thread.

>> In order to fix this problem, one could tweak
>> `minibuffer-completion-predicate' in `minibuffer-completion-help',
>> which is `file-exists-p' in the given case.
>
> I think we somehow need to make the error a bit more quiet.
> Most of it needs to be done on Tramp's side, but maybe we can help it by
> having the completion code warn Tramp that this is only used
> for completion.  Or maybe the completion code can catch the error and
> just display it calmly.

Thanks for reminding me! We have had the same problem in ido.el (and
icycles.el, IIRC), and I have introduced `tramp-completion-mode' exactly
for this purpose.

The appended patch shall fix it; Thierry, could you, please, test? You
need a `make bootstrap', because minibuffer.el is dumped into the binary.

--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/minibuffer.el'
*** lisp/minibuffer.el	2010-03-24 18:02:56 +0000
--- lisp/minibuffer.el	2010-04-12 03:48:02 +0000
***************
*** 1028,1034 ****
    "Display a list of possible completions of the current minibuffer contents."
    (interactive)
    (message "Making completion list...")
!   (let* ((start (field-beginning))
           (string (field-string))
           (completions (completion-all-completions
                         string
--- 1028,1035 ----
    "Display a list of possible completions of the current minibuffer contents."
    (interactive)
    (message "Making completion list...")
!   (let* ((tramp-completion-mode t)
! 	 (start (field-beginning))
           (string (field-string))
           (completions (completion-all-completions
                         string
--8<---------------cut here---------------end--------------->8---

>         Stefan

Best regards, Michael.






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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-11 20:12     ` Thierry Volpiatto
@ 2010-04-12  5:20       ` Michael Albinus
  2010-04-12  6:02         ` Thierry Volpiatto
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-12  5:20 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 5840

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> I didn't know and never use /hostname:, i always prefix it with method
> (e.g ssh).
>
> So i end up to this problem in anything by systematically translating
> path like /su:: /sudo:: or /hostname: by:
>
> /su:hostname:
> /sudo:hostname:
> /ssh:hostname:

When you have "/su::", how do you know what "hostname" ought to be? It
isn't always "localhost"; a user can configure any other hostname.

Best regards, Michael.






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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12  5:20       ` Michael Albinus
@ 2010-04-12  6:02         ` Thierry Volpiatto
  0 siblings, 0 replies; 26+ messages in thread
From: Thierry Volpiatto @ 2010-04-12  6:02 UTC (permalink / raw)
  To: bug-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> I didn't know and never use /hostname:, i always prefix it with method
>> (e.g ssh).
>>
>> So i end up to this problem in anything by systematically translating
>> path like /su:: /sudo:: or /hostname: by:
>>
>> /su:hostname:
>> /sudo:hostname:
>> /ssh:hostname:
>
> When you have "/su::", how do you know what "hostname" ought to be? It
> isn't always "localhost"; a user can configure any other hostname.
It is not localhost for me, i set it differently.

But it seem tramp is aware of that and use what is set in my
/etc/hosts.
I think the env variables are HOSTNAME and DNSDOMAIN, but it have maybe
changed in my system (gentoo), don't remember.
 
,----
| ELISP> (anything-create-tramp-name "/su::")
| "/su:root@my.network:"
`----


-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12  4:41     ` Michael Albinus
@ 2010-04-12 15:14       ` Thierry Volpiatto
  2010-04-12 18:20         ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Thierry Volpiatto @ 2010-04-12 15:14 UTC (permalink / raw)
  To: bug-gnu-emacs

Michael Albinus
<albinus@detlef.i-did-not-set--mail-host-address--so-tickle-me> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> (For the records, I also dislike Tramp's syntactic ambiguity. But this is
>>> history, I guess we cannot change it anymore.)
>>
>> Everything can be changed.
>
> Maybe we can discuss it in another thread.
>
>>> In order to fix this problem, one could tweak
>>> `minibuffer-completion-predicate' in `minibuffer-completion-help',
>>> which is `file-exists-p' in the given case.
>>
>> I think we somehow need to make the error a bit more quiet.
>> Most of it needs to be done on Tramp's side, but maybe we can help it by
>> having the completion code warn Tramp that this is only used
>> for completion.  Or maybe the completion code can catch the error and
>> just display it calmly.
>
> Thanks for reminding me! We have had the same problem in ido.el (and
> icycles.el, IIRC), and I have introduced `tramp-completion-mode' exactly
> for this purpose.
>
> The appended patch shall fix it; Thierry, could you, please, test? You
> need a `make bootstrap', because minibuffer.el is dumped into the binary.
Just tested your patch.
Yes it work fine. :-)
It propose similar completion on /su: than `anything-create-tramp-name'.

,----
| Possible completions are:
| su:localhost:
| su:root@
| su:my.network:
`----

Thank you.

> === modified file 'lisp/minibuffer.el'
> *** lisp/minibuffer.el	2010-03-24 18:02:56 +0000
> --- lisp/minibuffer.el	2010-04-12 03:48:02 +0000
> ***************
> *** 1028,1034 ****
>     "Display a list of possible completions of the current minibuffer contents."
>     (interactive)
>     (message "Making completion list...")
> !   (let* ((start (field-beginning))
>            (string (field-string))
>            (completions (completion-all-completions
>                          string
> --- 1028,1035 ----
>     "Display a list of possible completions of the current minibuffer contents."
>     (interactive)
>     (message "Making completion list...")
> !   (let* ((tramp-completion-mode t)
> ! 	 (start (field-beginning))
>            (string (field-string))
>            (completions (completion-all-completions
>                          string
>
>>         Stefan
>
> Best regards, Michael.
>
>
>
>
>

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12 15:14       ` Thierry Volpiatto
@ 2010-04-12 18:20         ` Stefan Monnier
  2010-04-12 19:08           ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-12 18:20 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: bug-gnu-emacs

[ I don't have Michael's email, sorry. ]

> === modified file 'lisp/minibuffer.el'
> *** lisp/minibuffer.el	2010-03-24 18:02:56 +0000
> --- lisp/minibuffer.el	2010-04-12 03:48:02 +0000
> ***************
> *** 1028,1034 ****
>     "Display a list of possible completions of the current minibuffer contents."
>     (interactive)
>     (message "Making completion list...")
> !   (let* ((start (field-beginning))
>            (string (field-string))
>            (completions (completion-all-completions
>                          string
> --- 1028,1035 ----
>     "Display a list of possible completions of the current minibuffer contents."
>     (interactive)
>     (message "Making completion list...")
> !   (let* ((tramp-completion-mode t)
> ! 	 (start (field-beginning))
>            (string (field-string))
>            (completions (completion-all-completions
>                          string

That's going very much along the lines of 

>> but maybe we can help it by having the completion code warn Tramp
>> that this is only used for completion.

so it'd be OK.  Two issues, tho:
1- first, I'd like to know why Tramp doesn't just signal an error,
   rather than mess with windows and stuff.
2- if we have to go this route it'll have to use a name that's not
   specific to tramp.  Maybe `completion-only' or something like that.


-- Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12 18:20         ` Stefan Monnier
@ 2010-04-12 19:08           ` Michael Albinus
  2010-04-12 20:51             ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-12 19:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> so it'd be OK.  Two issues, tho:
> 1- first, I'd like to know why Tramp doesn't just signal an error,
>    rather than mess with windows and stuff.

As I said, Tramp's syntax is ambigous. It tries to expand "/sudo:",
which is a valid remote file name. Due to the syntax ambiguity, Tramp
does not understand, that "sudo" is not a hostname in this case, and it
fails with an error. What you see is the usual Tramp behaviour in case
of an error, where it tries to give you some more information in case a
connection does not work.

The amount of information can be reduced by lowering `tramp-verbose'.

> 2- if we have to go this route it'll have to use a name that's not
>    specific to tramp.  Maybe `completion-only' or something like that.

D'accord. I had always a bad feeling spreading Tramp internal names to
the outside; when we have introduced that variable back in 2005 and
2007, Emacs was in a kind of feature freeze (IIRC), so I didn't ask for
such a variable.

`completion-*' symbols are spread over several *.el files. Where shall
`completion-only' belong to? minibuffer.el?

> -- Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12 19:08           ` Michael Albinus
@ 2010-04-12 20:51             ` Stefan Monnier
  2010-04-13  4:32               ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-12 20:51 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs, Thierry Volpiatto

>> so it'd be OK.  Two issues, tho:
>> 1- first, I'd like to know why Tramp doesn't just signal an error,
>> rather than mess with windows and stuff.

> As I said, Tramp's syntax is ambigous. It tries to expand "/sudo:",
> which is a valid remote file name. Due to the syntax ambiguity, Tramp
> does not understand, that "sudo" is not a hostname in this case, and it
> fails with an error. What you see is the usual Tramp behaviour in case
> of an error, where it tries to give you some more information in case a
> connection does not work.

And the question above is really talking about "signal an error"
(ie.. call just `signal' or `error') vs "the usual Tramp behaviour in
case of an error, where it tries to give you some more information in
case a connection does not work".  This "usual Tramp behavior" is quite
problematic since it can't be silenced in the usual condition-case way.

> The amount of information can be reduced by lowering `tramp-verbose'.

Maybe the verbosity should be reduced by default.  Or maybe it should be
provided differently: we could make it so that the top-level exception
handler (the one that outputs the message in the minibuffer if an error
is not otherwise caught) can be programmed, so Tramp could call `signal'
in the normal way and do the messy window-pop-up in the top-level
exception handler instead (so it doesn't do it if the error gets
caught).
That could save us from a `completion-only' kind of hack.

>> 2- if we have to go this route it'll have to use a name that's not
>> specific to tramp.  Maybe `completion-only' or something like that.

> D'accord. I had always a bad feeling spreading Tramp internal names to
> the outside; when we have introduced that variable back in 2005 and
> 2007, Emacs was in a kind of feature freeze (IIRC), so I didn't ask for
> such a variable.

> `completion-*' symbols are spread over several *.el files.

AFAIK they're in completion.el (a historical accident), simple.el (a
historical accident since most of the completion code was in C back
then), and minibuffer.el (which I couldn't call completion.el because
of the previous historical accient).

> Where shall `completion-only' belong to? minibuffer.el?

Yes.


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-12 20:51             ` Stefan Monnier
@ 2010-04-13  4:32               ` Michael Albinus
  2010-04-13  6:25                 ` Thierry Volpiatto
                                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Michael Albinus @ 2010-04-13  4:32 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Or maybe it should be provided differently: we could make it so that
> the top-level exception handler (the one that outputs the message in
> the minibuffer if an error is not otherwise caught) can be programmed,
> so Tramp could call `signal' in the normal way and do the messy
> window-pop-up in the top-level exception handler instead (so it
> doesn't do it if the error gets caught).

This would be an option, yes. Also for other use cases than this reported one.

> That could save us from a `completion-only' kind of hack.

No. It is not only about catching errors. If, for example, your default
method is "ftp", expanding "/sudo:" would not result in an error, but in
the password request for "albinus@sudo" (in my case). This must be
suppressed as well, so we still need this flag to tell Tramp not to
expand an incomplete filename.

>> Where shall `completion-only' belong to? minibuffer.el?
>
> Yes.

I'll commit it later today.

>         Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-13  4:32               ` Michael Albinus
@ 2010-04-13  6:25                 ` Thierry Volpiatto
  2010-04-13 12:31                 ` Stefan Monnier
  2010-04-13 13:09                 ` Stefan Monnier
  2 siblings, 0 replies; 26+ messages in thread
From: Thierry Volpiatto @ 2010-04-13  6:25 UTC (permalink / raw)
  To: bug-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Or maybe it should be provided differently: we could make it so that
>> the top-level exception handler (the one that outputs the message in
>> the minibuffer if an error is not otherwise caught) can be programmed,
>> so Tramp could call `signal' in the normal way and do the messy
>> window-pop-up in the top-level exception handler instead (so it
>> doesn't do it if the error gets caught).
>
> This would be an option, yes. Also for other use cases than this reported one.
>
>> That could save us from a `completion-only' kind of hack.
>
> No. It is not only about catching errors. If, for example, your default
> method is "ftp", expanding "/sudo:" would not result in an error, but in
> the password request for "albinus@sudo" (in my case). This must be
> suppressed as well, so we still need this flag to tell Tramp not to
> expand an incomplete filename.
>
>>> Where shall `completion-only' belong to? minibuffer.el?
>>
>> Yes.
>
> I'll commit it later today.

The patch you sent to me against minibuffer.el was working fine.
However i tried to complete with Emacs build of today 
(<2010-04-13 Mar.>)
and even if it complete, i still have the error buffer as soon as i
enter the first ":" (e.g /su::).

With my anything file completion i have no error but i have now to
require tramp.


-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-13  4:32               ` Michael Albinus
  2010-04-13  6:25                 ` Thierry Volpiatto
@ 2010-04-13 12:31                 ` Stefan Monnier
  2010-04-13 13:09                 ` Stefan Monnier
  2 siblings, 0 replies; 26+ messages in thread
From: Stefan Monnier @ 2010-04-13 12:31 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs, Thierry Volpiatto

>> That could save us from a `completion-only' kind of hack.

> No. It is not only about catching errors. If, for example, your default
> method is "ftp", expanding "/sudo:" would not result in an error, but in
> the password request for "albinus@sudo" (in my case). This must be
> suppressed as well, so we still need this flag to tell Tramp not to
> expand an incomplete filename.

Good point, indeed, thank you,


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-13  4:32               ` Michael Albinus
  2010-04-13  6:25                 ` Thierry Volpiatto
  2010-04-13 12:31                 ` Stefan Monnier
@ 2010-04-13 13:09                 ` Stefan Monnier
  2010-04-13 13:28                   ` Michael Albinus
  2 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-13 13:09 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs, Thierry Volpiatto

>>> Where shall `completion-only' belong to? minibuffer.el?
>> Yes.
> I'll commit it later today.

Actually, now that I think about it, I think it's more general
than that.  It's basically the idea that the current execution is
non-essential (e.g. part of some background computation, or some
not-necessarily-expected part of a command like loading a desktop(.el)).

So maybe the variable should be in simple.el and named `non-essential'.


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-13 13:09                 ` Stefan Monnier
@ 2010-04-13 13:28                   ` Michael Albinus
  2010-04-14 15:31                     ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-13 13:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Actually, now that I think about it, I think it's more general
> than that.  It's basically the idea that the current execution is
> non-essential (e.g. part of some background computation, or some
> not-necessarily-expected part of a command like loading a desktop(.el)).
>
> So maybe the variable should be in simple.el and named `non-essential'.

Could you, please, add this variable to simple.el, with a proper
docstring? I tend to fail with understable descriptions ...

I will apply the additional changes in minibuffer.el, ido.el and
tramp.el afterwards.

>         Stefan

Thanks, and best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-13 13:28                   ` Michael Albinus
@ 2010-04-14 15:31                     ` Stefan Monnier
  2010-04-14 22:11                       ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-14 15:31 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

>> Actually, now that I think about it, I think it's more general
>> than that.  It's basically the idea that the current execution is
>> non-essential (e.g. part of some background computation, or some
>> not-necessarily-expected part of a command like loading a desktop(.el)).
>> So maybe the variable should be in simple.el and named `non-essential'.

> Could you, please, add this variable to simple.el, with a proper
> docstring? I tend to fail with understable descriptions ...

I've just added it.
*BUT* I also realized that your suggested patch:

   ***************
   *** 1028,1034 ****
       "Display a list of possible completions of the current minibuffer contents."
       (interactive)
       (message "Making completion list...")
   !   (let* ((start (field-beginning))
              (string (field-string))
              (completions (completion-all-completions
                            string
   --- 1028,1035 ----
       "Display a list of possible completions of the current minibuffer contents."
       (interactive)
       (message "Making completion list...")
   !   (let* ((non-essential t)
   ! 	 (start (field-beginning))
              (string (field-string))
              (completions (completion-all-completions
                            string

is not OK: when I hit ? (or TAB) in the minibuffer, I really do want
Tramp to give me the possible completions, even if that requires my
entering a password.

So, it should be added to ido/icomplete and to the original code:

  (add-hook 'minibuffer-setup-hook
            (lambda ()
              (let ((non-essential t))
                (add-hook 'post-command-hook
                          'minibuffer-completion-help nil t))))

but not to the minibuffer-completion-help itself.


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-14 15:31                     ` Stefan Monnier
@ 2010-04-14 22:11                       ` Michael Albinus
  2010-04-15  5:01                         ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-14 22:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Could you, please, add this variable to simple.el, with a proper
>> docstring? I tend to fail with understable descriptions ...
>
> I've just added it.

Thanks.

> *BUT* I also realized that your suggested patch:
> is not OK: when I hit ? (or TAB) in the minibuffer, I really do want
> Tramp to give me the possible completions, even if that requires my
> entering a password.

But this still works. As soon as Tramp detects, that the file name is a
"syntactical complete" one, it lets you complete the remote file name
path. That means "/string:?" would be completed only in case "string" is
not a method name. "/string::?" or "/string:/?" or "/string:.?" will
always be completed with path names, because due to the syntax it is
clear that "string" must be a host name.

I have committed the changes; according to my tests it works fine.

>         Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-14 22:11                       ` Michael Albinus
@ 2010-04-15  5:01                         ` Stefan Monnier
  2010-04-15 13:06                           ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-15  5:01 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

>> *BUT* I also realized that your suggested patch:
>> is not OK: when I hit ? (or TAB) in the minibuffer, I really do want
>> Tramp to give me the possible completions, even if that requires my
>> entering a password.

> But this still works. As soon as Tramp detects, that the file name is a
> "syntactical complete" one, it lets you complete the remote file name
> path. That means "/string:?" would be completed only in case "string" is
> not a method name. "/string::?" or "/string:/?" or "/string:.?" will
> always be completed with path names, because due to the syntax it is
> clear that "string" must be a host name.

Hmmm... so Tramp does not interpret `non-essential' in the same way as
I do (and the way I documented in the docstring).  E.g. when using
icomplete (which should set non-essential for the same reason as ido,
IIUC), I wouldn't want Tramp to try to connect to the host just because
I've started typing "/ssh:host:something".


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-15  5:01                         ` Stefan Monnier
@ 2010-04-15 13:06                           ` Michael Albinus
  2010-04-15 18:59                             ` Stefan Monnier
  2010-04-15 19:22                             ` Stefan Monnier
  0 siblings, 2 replies; 26+ messages in thread
From: Michael Albinus @ 2010-04-15 13:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Hmmm... so Tramp does not interpret `non-essential' in the same way as
> I do (and the way I documented in the docstring).  E.g. when using
> icomplete (which should set non-essential for the same reason as ido,
> IIUC), I wouldn't want Tramp to try to connect to the host just because
> I've started typing "/ssh:host:something".

It doesn't. It starts connecting the host when you type
"/ssh:host:something?" or "/ssh:host:something <TAB>".

Btw, I'm not sure whether ido.el needs `non-essential. I've just
replaced `tramp-completion-mode' there, without too much testing whether
it could be rearranged.

>         Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-15 13:06                           ` Michael Albinus
@ 2010-04-15 18:59                             ` Stefan Monnier
  2010-04-15 19:22                             ` Stefan Monnier
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Monnier @ 2010-04-15 18:59 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

>> Hmmm... so Tramp does not interpret `non-essential' in the same way as
>> I do (and the way I documented in the docstring).  E.g. when using
>> icomplete (which should set non-essential for the same reason as ido,
>> IIUC), I wouldn't want Tramp to try to connect to the host just because
>> I've started typing "/ssh:host:something".

> It doesn't. It starts connecting the host when you type
> "/ssh:host:something?" or "/ssh:host:something <TAB>".

Even with ido?


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-15 13:06                           ` Michael Albinus
  2010-04-15 18:59                             ` Stefan Monnier
@ 2010-04-15 19:22                             ` Stefan Monnier
  2010-04-15 22:32                               ` Michael Albinus
  1 sibling, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-15 19:22 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

>> Hmmm... so Tramp does not interpret `non-essential' in the same way as
>> I do (and the way I documented in the docstring).  E.g. when using
>> icomplete (which should set non-essential for the same reason as ido,
>> IIUC), I wouldn't want Tramp to try to connect to the host just because
>> I've started typing "/ssh:host:something".

> It doesn't. It starts connecting the host when you type
> "/ssh:host:something?" or "/ssh:host:something <TAB>".

I just tried:

% emacs -Q
M-x ido-mode RET
C-x C-f /ssh:turlutu:

and when I hit the last : Tramp gave me an error which disrupted my
window arrangement and made it painful to fix the spelling of the host
name.  And I did not hit any TAB, or question mark.
Currently icomplete-mode doesn't set non-essential, so it gets an error
even earlier, but even if it were to set non-essential, it'll get the
exact same problem.

Of course, maybe your opinion is that it's not a problem.

Anyway, here's a more serious problem:

M-x icomplete-mode RET C-x C-f /pas

and it immediately tries to connect to my machine `pastel'.  The lack of
`non-essential' in icomplete.el does not excuse this.  Can you explain
why Tramp tries to connect to a machine whose name I haven't even fully
typed yet?


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-15 19:22                             ` Stefan Monnier
@ 2010-04-15 22:32                               ` Michael Albinus
  2010-04-16  0:32                                 ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-15 22:32 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> I just tried:
>
> % emacs -Q
> M-x ido-mode RET
> C-x C-f /ssh:turlutu:
>
> and when I hit the last : Tramp gave me an error which disrupted my
> window arrangement and made it painful to fix the spelling of the host
> name.  And I did not hit any TAB, or question mark.
> Currently icomplete-mode doesn't set non-essential, so it gets an error
> even earlier, but even if it were to set non-essential, it'll get the
> exact same problem.
>
> Of course, maybe your opinion is that it's not a problem.

Of course, this is an error. I've just committed a patch which makes
Tramp less noisy in this case; tested with your ido example above.

> Anyway, here's a more serious problem:
>
> M-x icomplete-mode RET C-x C-f /pas
>
> and it immediately tries to connect to my machine `pastel'.  The lack of
> `non-essential' in icomplete.el does not excuse this.  Can you explain
> why Tramp tries to connect to a machine whose name I haven't even fully
> typed yet?

Sorry, I cannot reproduce the problem with "emacs -Q". At this point,
Tramp shall not be loaded even. Could you, please, show the backtrace?

>         Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-15 22:32                               ` Michael Albinus
@ 2010-04-16  0:32                                 ` Stefan Monnier
  2010-04-21 19:52                                   ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2010-04-16  0:32 UTC (permalink / raw)
  To: Michael Albinus; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

>> and it immediately tries to connect to my machine `pastel'.  The lack of
>> `non-essential' in icomplete.el does not excuse this.  Can you explain
>> why Tramp tries to connect to a machine whose name I haven't even fully
>> typed yet?

> Sorry, I cannot reproduce the problem with "emacs -Q". At this point,
> Tramp shall not be loaded even.

Indeed, I was using an icomplete.el with slightly changed default
settings, sorry.  Here is the complete tested recipe:

   % emacs -Q
   C-x C-f /su: C-g
   M-: (setq icomplete-with-completion-tables '(read-file-name-internal))
   M-x icomplete-mode
   C-x C-f /

and that's enough to trigger popping up a "*tramp/scp fcp*" window
telling me "Process *tramp/scp fcp* exited abnormally with code 255"


        Stefan







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-16  0:32                                 ` Stefan Monnier
@ 2010-04-21 19:52                                   ` Michael Albinus
  2011-11-20 16:15                                     ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2010-04-21 19:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-gnu-emacs@gnu.org, Thierry Volpiatto

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Indeed, I was using an icomplete.el with slightly changed default
> settings, sorry.  Here is the complete tested recipe:
>
>    % emacs -Q
>    C-x C-f /su: C-g
>    M-: (setq icomplete-with-completion-tables '(read-file-name-internal))
>    M-x icomplete-mode
>    C-x C-f /
>
> and that's enough to trigger popping up a "*tramp/scp fcp*" window
> telling me "Process *tramp/scp fcp* exited abnormally with code 255"

Should be solved now with my latest commit. However, there is a
remaining problem, `partial-completion' seems to have a bug:

# emacs -Q
M-: (setq completion-styles '(partial-completion))
C-x C-f /sudo:: TAB => /sudo:sudo:

For all other completion styles, this bug does not occur. Maybe an
additional style would be useful, because "/sudo:: TAB" does not provide
further choices, until the connection has been established. This might
require special handling.

>         Stefan

Best regards, Michael.







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

* bug#5840: 24.0.50; wrong tramp-file-name-regexp
  2010-04-21 19:52                                   ` Michael Albinus
@ 2011-11-20 16:15                                     ` Michael Albinus
  0 siblings, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2011-11-20 16:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5840-done, Thierry Volpiatto

Michael Albinus <michael.albinus@gmx.de> writes:

> Should be solved now with my latest commit. However, there is a
> remaining problem, `partial-completion' seems to have a bug:
>
> # emacs -Q
> M-: (setq completion-styles '(partial-completion))
> C-x C-f /sudo:: TAB => /sudo:sudo:
>
> For all other completion styles, this bug does not occur. Maybe an
> additional style would be useful, because "/sudo:: TAB" does not provide
> further choices, until the connection has been established. This might
> require special handling.

I'm closing this bug; the originally reported problem seems to be
fixed. The remaining problem is handled now by Bug#10085, nobody has
cared about it when mentioned here.

>>         Stefan

Best regards, Michael.





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

end of thread, other threads:[~2011-11-20 16:15 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-06  6:06 bug#5840: 24.0.50; wrong tramp-file-name-regexp Thierry Volpiatto
2010-04-11 16:54 ` Michael Albinus
2010-04-11 18:53   ` Stefan Monnier
2010-04-11 20:12     ` Thierry Volpiatto
2010-04-12  5:20       ` Michael Albinus
2010-04-12  6:02         ` Thierry Volpiatto
2010-04-12  4:41     ` Michael Albinus
2010-04-12 15:14       ` Thierry Volpiatto
2010-04-12 18:20         ` Stefan Monnier
2010-04-12 19:08           ` Michael Albinus
2010-04-12 20:51             ` Stefan Monnier
2010-04-13  4:32               ` Michael Albinus
2010-04-13  6:25                 ` Thierry Volpiatto
2010-04-13 12:31                 ` Stefan Monnier
2010-04-13 13:09                 ` Stefan Monnier
2010-04-13 13:28                   ` Michael Albinus
2010-04-14 15:31                     ` Stefan Monnier
2010-04-14 22:11                       ` Michael Albinus
2010-04-15  5:01                         ` Stefan Monnier
2010-04-15 13:06                           ` Michael Albinus
2010-04-15 18:59                             ` Stefan Monnier
2010-04-15 19:22                             ` Stefan Monnier
2010-04-15 22:32                               ` Michael Albinus
2010-04-16  0:32                                 ` Stefan Monnier
2010-04-21 19:52                                   ` Michael Albinus
2011-11-20 16:15                                     ` Michael Albinus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).