unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45402: 28.0.50; new completion inconvenience
@ 2020-12-24  5:53 Richard Stallman
  2020-12-24  5:58 ` Jean Louis
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Richard Stallman @ 2020-12-24  5:53 UTC (permalink / raw)
  To: 45402


My default directory is ~/ and I tyoe C-x C-f /med TAB.

It used to give me ~//media/.  Another TAB would give me
~//media/rms/.

But now it gives me ~//media and more TABs does not get me any further
than that.

I think this is related to Tramp, but I don't use Tramp.



In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, cairo version 1.15.10)
 of 2020-12-08 built on freetop
Repository revision: 0155bd0fdb166c97a2ce76cc5bc64fd195a676d3
Repository branch: master
System Description: Trisquel GNU/Linux Etiona (9.0)

Configured using:
 'configure --with-gnutls=ifavailable 'CFLAGS=-O0 -g''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 XDBE XIM MODULES THREADS PDUMPER

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-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
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(whitespace cl-print debug backtrace rmail-spam-filter rmailedit
rmailsort undigest tramp-gvfs zeroconf tramp-cache bug-reference
shortdoc help-fns radix-tree descr-text help-at-pt ispell unrmail
time-stamp texinfo url-http url-auth url-gw nsm tramp tramp-loaddefs
trampver tramp-integration tramp-compat ls-lisp arc-mode archive-mode
srecode/srt-mode semantic/analyze semantic/sort semantic/scope
semantic/analyze/fcn semantic/db semantic/format srecode/template
srecode/srt-wy semantic/wisent semantic/wisent/wisent semantic/ctxt
srecode/ctxt semantic/tag-ls semantic/find srecode/compile
srecode/dictionary srecode/fields srecode/table srecode eieio-base
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet pcmpl-unix rect compare-w novice kmacro
etags fileloop xref project quail mail-extr pp shadow emacsbug
smerge-mode diff log-edit pcvs-util add-log org-element avl-tree
generator ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start
gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view jka-compr
image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys
org-compat org-macs org-loaddefs format-spec find-func cal-menu
calendar cal-loaddefs cl-extra parse-time iso8601 mhtml-mode css-mode
smie eww xdg url-queue mm-url gnus nnheader wid-edit color js imenu
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs sgml-mode help-mode mule-util shell
pcomplete thingatpt files-x grep compile comint ansi-color ring
misearch multi-isearch epa-mail rmailkwd rmailsum vc-mtn vc-hg vc-git
diff-mode easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc
vc-dispatcher shr kinsoku svg xml dom rmailout dabbrev mailalias
sendmail qp rmailmm message rmc puny rfc822 mml mml-sec epa epg
epg-config gnus-util text-property-search time-date mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231
rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils dired-aux dired dired-loaddefs t-mouse term/linux view
derived paren cus-start cus-load advice finder-inf package easymenu
browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode
elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet
lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese composite charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 1028535 143643)
 (symbols 48 45508 18)
 (strings 32 215598 23071)
 (string-bytes 1 5404871)
 (vectors 16 73141)
 (vector-slots 8 2067265 131585)
 (floats 8 451 453)
 (intervals 56 129103 4709)
 (buffers 984 160))
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24  5:53 bug#45402: 28.0.50; new completion inconvenience Richard Stallman
@ 2020-12-24  5:58 ` Jean Louis
  2020-12-24  8:53 ` Michael Albinus
  2020-12-25  5:56 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 23+ messages in thread
From: Jean Louis @ 2020-12-24  5:58 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 45402

* Richard Stallman <rms@gnu.org> [2020-12-24 08:54]:
> 
> My default directory is ~/ and I tyoe C-x C-f /med TAB.
> 
> It used to give me ~//media/.  Another TAB would give me
> ~//media/rms/.

If you don't type double slash and press TAB what happens then?

Instead of ~//media, try ~/media<TAB>






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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24  5:53 bug#45402: 28.0.50; new completion inconvenience Richard Stallman
  2020-12-24  5:58 ` Jean Louis
@ 2020-12-24  8:53 ` Michael Albinus
  2020-12-24 14:36   ` Eli Zaretskii
  2020-12-25  4:42   ` Richard Stallman
  2020-12-25  5:56 ` Lars Ingebrigtsen
  2 siblings, 2 replies; 23+ messages in thread
From: Michael Albinus @ 2020-12-24  8:53 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 45402

Richard Stallman <rms@gnu.org> writes:

Hi Richard,

> My default directory is ~/ and I tyoe C-x C-f /med TAB.
>
> It used to give me ~//media/.  Another TAB would give me
> ~//media/rms/.
>
> But now it gives me ~//media and more TABs does not get me any further
> than that.
>
> I think this is related to Tramp, but I don't use Tramp.

This is Tramp indeed. It knows a new method "media", which is in the way
now for you. If you enter another "/" after "...media" in your
minibuffer, TAB will continue to complete as you know.

If you don't use Tramp, just set tramp-mode to nil in your .emacs.

Best regards, Michael.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24  8:53 ` Michael Albinus
@ 2020-12-24 14:36   ` Eli Zaretskii
  2020-12-24 17:02     ` Michael Albinus
  2020-12-25  4:42   ` Richard Stallman
  1 sibling, 1 reply; 23+ messages in thread
From: Eli Zaretskii @ 2020-12-24 14:36 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 45402, rms

> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Thu, 24 Dec 2020 09:53:40 +0100
> Cc: 45402@debbugs.gnu.org
> 
> > My default directory is ~/ and I tyoe C-x C-f /med TAB.
> >
> > It used to give me ~//media/.  Another TAB would give me
> > ~//media/rms/.
> >
> > But now it gives me ~//media and more TABs does not get me any further
> > than that.
> >
> > I think this is related to Tramp, but I don't use Tramp.
> 
> This is Tramp indeed. It knows a new method "media", which is in the way
> now for you. If you enter another "/" after "...media" in your
> minibuffer, TAB will continue to complete as you know.

Really?  I always thought that the leading slash in "/media" causes
Emacs to disregard the "~/" part, and interpret the rest as relative
to "/", the filesystem root?  When I type '/' on my system, Emacs
gives the preceding "~/" part a shadow-y color (and on a TTY places it
in {..}), to show that it is being ignored.

How come Richard gets ~//media instead? he should get /media, without
the leading "~/".  What am I missing?





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24 14:36   ` Eli Zaretskii
@ 2020-12-24 17:02     ` Michael Albinus
  2020-12-24 17:18       ` Eli Zaretskii
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Albinus @ 2020-12-24 17:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 45402, rms

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

> Really?  I always thought that the leading slash in "/media" causes
> Emacs to disregard the "~/" part, and interpret the rest as relative
> to "/", the filesystem root?  When I type '/' on my system, Emacs
> gives the preceding "~/" part a shadow-y color (and on a TTY places it
> in {..}), to show that it is being ignored.

Yes.

> How come Richard gets ~//media instead? he should get /media, without
> the leading "~/".  What am I missing?

The leading "~/" string is greyed out. That's expected.

Best regards, Michael.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24 17:02     ` Michael Albinus
@ 2020-12-24 17:18       ` Eli Zaretskii
  0 siblings, 0 replies; 23+ messages in thread
From: Eli Zaretskii @ 2020-12-24 17:18 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 45402, rms

> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: rms@gnu.org,  45402@debbugs.gnu.org
> Date: Thu, 24 Dec 2020 18:02:35 +0100
> 
> > How come Richard gets ~//media instead? he should get /media, without
> > the leading "~/".  What am I missing?
> 
> The leading "~/" string is greyed out. That's expected.

If that's the case, fine.  I thought it wasn't, as Richard was
mentioning it, although it is effectively deleted.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24  8:53 ` Michael Albinus
  2020-12-24 14:36   ` Eli Zaretskii
@ 2020-12-25  4:42   ` Richard Stallman
  2020-12-25 11:06     ` Michael Albinus
  1 sibling, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2020-12-25  4:42 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 45402

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > This is Tramp indeed. It knows a new method "media", which is in the way
  > now for you.

This is an unfortunate choice of name.  GNU/Linux (at least some distros)
automounts disks and memories under /media, which means that this Tramp
method name is going to collide regularly.

How about if we look at changing the name in Tramp.  Can you see
another name that fits what it does?
(What does it do?)

  
-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-24  5:53 bug#45402: 28.0.50; new completion inconvenience Richard Stallman
  2020-12-24  5:58 ` Jean Louis
  2020-12-24  8:53 ` Michael Albinus
@ 2020-12-25  5:56 ` Lars Ingebrigtsen
  2020-12-25 11:17   ` Michael Albinus
  2020-12-25 11:20   ` Kévin Le Gouguec
  2 siblings, 2 replies; 23+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-25  5:56 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 45402

Richard Stallman <rms@gnu.org> writes:

> My default directory is ~/ and I tyoe C-x C-f /med TAB.
>
> It used to give me ~//media/.  Another TAB would give me
> ~//media/rms/.

But why do you type "/med TAB" instead of "med TAB"?

And I'm unable to reproduce the behaviour you're describing in older
Emacs versions -- I tried this in Emacs 25.1, and `C-x C-f /med TAB'
just gives me "No match", even if ~/media exists.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25  4:42   ` Richard Stallman
@ 2020-12-25 11:06     ` Michael Albinus
  2020-12-26 10:22       ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Albinus @ 2020-12-25 11:06 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 45402

Richard Stallman <rms@gnu.org> writes:

Hi Richard,

>   > This is Tramp indeed. It knows a new method "media", which is in the way
>   > now for you.
>
> This is an unfortunate choice of name.  GNU/Linux (at least some distros)
> automounts disks and memories under /media, which means that this Tramp
> method name is going to collide regularly.
>
> How about if we look at changing the name in Tramp.  Can you see
> another name that fits what it does?

Makes sense, yes.

> (What does it do?)

It gives you file access to USB mounted media devices, like digital
cameras, Android and i(Pad)OS devices. Usually, those devices do not
appear locally under /media, that's why I have added them in Tramp.

The mount protocols are different depending on the device, they could be
"mtp" or "gphoto2". In order to hide these details, I have chosen the
Tramp connection method "media", which DTRT for whichever protocol. What
different Tramp connection name shall I use instead? I'm notorious bad
in selecting proper names.

Best regards, Michael.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25  5:56 ` Lars Ingebrigtsen
@ 2020-12-25 11:17   ` Michael Albinus
  2020-12-25 11:20   ` Kévin Le Gouguec
  1 sibling, 0 replies; 23+ messages in thread
From: Michael Albinus @ 2020-12-25 11:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 45402, Richard Stallman

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi Lars,

>> My default directory is ~/ and I tyoe C-x C-f /med TAB.
>>
>> It used to give me ~//media/.  Another TAB would give me
>> ~//media/rms/.
>
> But why do you type "/med TAB" instead of "med TAB"?

Because he wants to enter the "/media" directory.

> And I'm unable to reproduce the behaviour you're describing in older
> Emacs versions -- I tried this in Emacs 25.1, and `C-x C-f /med TAB'
> just gives me "No match", even if ~/media exists.

"/med" has nothing to do with "~/media".

And Tramp's "media" method exist only in the master branch.

Best regards, Michael.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25  5:56 ` Lars Ingebrigtsen
  2020-12-25 11:17   ` Michael Albinus
@ 2020-12-25 11:20   ` Kévin Le Gouguec
  2020-12-25 19:31     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 23+ messages in thread
From: Kévin Le Gouguec @ 2020-12-25 11:20 UTC (permalink / raw)
  To: 45402

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Richard Stallman <rms@gnu.org> writes:
>
>> My default directory is ~/ and I tyoe C-x C-f /med TAB.
>>
>> It used to give me ~//media/.  Another TAB would give me
>> ~//media/rms/.
>
> But why do you type "/med TAB" instead of "med TAB"?

The assumption, I believe, is that the target folder is under /media/,
while the initial prompt is "~/".  Starting with a slash causes the
initial prompt to be "greyed out" (i.e. rendered ineffectual unless the
user backspaces).

> And I'm unable to reproduce the behaviour you're describing in older
> Emacs versions -- I tried this in Emacs 25.1, and `C-x C-f /med TAB'
> just gives me "No match", even if ~/media exists.

As Richard explained in <E1ksevx-0003Un-Sf@fencepost.gnu.org>, some
GNU/Linux distros mount external media under /media/$USER, so typing
/med TAB greys out the initial ~/ and used to complete to /media/$USER
(if $USER is the only folder under /media).  Now users need to type an
additional slash to disambiguate from "/media:".






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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25 11:20   ` Kévin Le Gouguec
@ 2020-12-25 19:31     ` Lars Ingebrigtsen
  2020-12-25 20:31       ` Michael Albinus
  0 siblings, 1 reply; 23+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-25 19:31 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 45402

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

>> But why do you type "/med TAB" instead of "med TAB"?
>
> The assumption, I believe, is that the target folder is under /media/,
> while the initial prompt is "~/".  Starting with a slash causes the
> initial prompt to be "greyed out" (i.e. rendered ineffectual unless the
> user backspaces).

Oh, I see.  I thought Richard wanted to get to a directory called
~/media/.

> As Richard explained in <E1ksevx-0003Un-Sf@fencepost.gnu.org>, some
> GNU/Linux distros mount external media under /media/$USER, so typing
> /med TAB greys out the initial ~/ and used to complete to /media/$USER
> (if $USER is the only folder under /media).  Now users need to type an
> additional slash to disambiguate from "/media:".

Yup; I've also got a /media/ directory, and I see the same thing.
/media/ is a common directory on many systems -- would it make sense to
rename the Tramp method to something other than media:?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25 19:31     ` Lars Ingebrigtsen
@ 2020-12-25 20:31       ` Michael Albinus
  2020-12-25 22:11         ` bug#45402: Rename Tramp method "media" Kévin Le Gouguec
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Albinus @ 2020-12-25 20:31 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 45402, Kévin Le Gouguec

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi Lars,

>> As Richard explained in <E1ksevx-0003Un-Sf@fencepost.gnu.org>, some
>> GNU/Linux distros mount external media under /media/$USER, so typing
>> /med TAB greys out the initial ~/ and used to complete to /media/$USER
>> (if $USER is the only folder under /media).  Now users need to type an
>> additional slash to disambiguate from "/media:".
>
> Yup; I've also got a /media/ directory, and I see the same thing.
> /media/ is a common directory on many systems -- would it make sense to
> rename the Tramp method to something other than media:?

Yes, as I said already to Richard. I just miss a better name. Any
proposals?

(Internally, the GVFS methods mtp and gphoto2 are used. Although I have
sympathy for the name mtp, it would be wrong wrt gphoto2.)

Best regards, Michael.





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 20:31       ` Michael Albinus
@ 2020-12-25 22:11         ` Kévin Le Gouguec
  2020-12-25 22:35           ` Drew Adams
  2020-12-26 11:44           ` Michael Albinus
  0 siblings, 2 replies; 23+ messages in thread
From: Kévin Le Gouguec @ 2020-12-25 22:11 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Lars Ingebrigtsen, 45402

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

> (Internally, the GVFS methods mtp and gphoto2 are used. Although I have
> sympathy for the name mtp, it would be wrong wrt gphoto2.)

Going by Wikipedia, maybe /mtp: isn't too off-target?

> gPhoto has support for the Picture Transfer Protocol (PTP) and will
> also connect to devices that use the Media Transfer Protocol (MTP).
https://en.wikipedia.org/wiki/GPhoto

> Whereas PTP was designed for downloading photographs from digital
> cameras, Media Transfer Protocol allows the transfer of music files on
> digital audio players and media files on portable media players, as
> well as personal information on personal digital assistants.
https://en.wikipedia.org/wiki/Media_Transfer_Protocol

I have no expertise whatsoever about these protocols; I only learned
about them just now.  Are there users we could poll to find a method
name that makes sense?  I've looked at 2020-01-22 "Add new Tramp method
"media"" (2d9d62bb24), but I could not see any bug ID, so I don't know
who we could turn to.





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 22:11         ` bug#45402: Rename Tramp method "media" Kévin Le Gouguec
@ 2020-12-25 22:35           ` Drew Adams
  2020-12-25 23:38             ` Kévin Le Gouguec
  2020-12-26  8:44             ` Michael Albinus
  2020-12-26 11:44           ` Michael Albinus
  1 sibling, 2 replies; 23+ messages in thread
From: Drew Adams @ 2020-12-25 22:35 UTC (permalink / raw)
  To: Kévin Le Gouguec, Michael Albinus; +Cc: Lars Ingebrigtsen, 45402

It's no doubt too late now, at least in general,
but maybe it would make sense to use a prefix
for Tramp, kind of like what we do for libraries.

Besides being too late, I imagine someone will
say that that would be too verbose for users to
type, which is true.

But even a prefix of "t" might be sufficient to
usually distinguish Tramp's protocol names.  In
this case, ~//tmedia would mean Tramp's protocol
and ~//media would mean (change to) local
directory /media.

Yeah, it's ugly.  But the Tramp syntax is
apparently inherently ambiguous here (i.e., can
conflict with a dir name).





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 22:35           ` Drew Adams
@ 2020-12-25 23:38             ` Kévin Le Gouguec
  2020-12-26  8:52               ` Michael Albinus
  2020-12-26  8:44             ` Michael Albinus
  1 sibling, 1 reply; 23+ messages in thread
From: Kévin Le Gouguec @ 2020-12-25 23:38 UTC (permalink / raw)
  To: Drew Adams; +Cc: Lars Ingebrigtsen, Michael Albinus, 45402, rms

Drew Adams <drew.adams@oracle.com> writes:

> It's no doubt too late now, at least in general,
> but maybe it would make sense to use a prefix
> for Tramp, kind of like what we do for libraries.

I might be missing something, but it seems to me like there is a rather
large design space for opt-in, backward-compatible ways to disambiguate
Tramp methods: off the top of my head, I could imagine e.g. a variable
(say "tramp-implicit-methods") which

- could default to t, meaning:

> always assume that /foo can actually mean /trampfoo for all foo's
> supported by Tramp

- could be set to a list of commonly used Tramp methods, e.g. '("ssh"
  "sudoedit"), meaning:

> when I type /ssh, assume that I can mean /trampssh; otherwise if I
> type /foo assume that I never mean /trampfoo

- could be set to nil, meaning:

> when I type /foo, I *never* mean /trampfoo for any foo supported by
> Tramp; I will always type out /trampfoo:

Or we could go the opposite route, with e.g. tramp-explicit-methods (nil
by default), which in the context of this report could be set to
'("media") so that /media can complete to /media/$USER, and users would
be required to type out /trampmedia: explicitly.





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 22:35           ` Drew Adams
  2020-12-25 23:38             ` Kévin Le Gouguec
@ 2020-12-26  8:44             ` Michael Albinus
  2020-12-26 18:53               ` Drew Adams
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Albinus @ 2020-12-26  8:44 UTC (permalink / raw)
  To: Drew Adams; +Cc: Lars Ingebrigtsen, 45402, Kévin Le Gouguec

Drew Adams <drew.adams@oracle.com> writes:

Hi Drew,

> But even a prefix of "t" might be sufficient to
> usually distinguish Tramp's protocol names.  In
> this case, ~//tmedia would mean Tramp's protocol
> and ~//media would mean (change to) local
> directory /media.

Until now, it is just the "media" method which is too close to a
directory name. And this can simply be avoided; taking "media" off the
default values of tramp-gvfs-methods would deactivate it; users who want
to exploit it must activate it first.

But currently I'm thinking about Kévin's arguments to call it "mtp". It
was also my first choice, but I wanted to be fair to the "gphoto2" method.

> Yeah, it's ugly.  But the Tramp syntax is
> apparently inherently ambiguous here (i.e., can
> conflict with a dir name).

This will always be the case. Once I got a bug report from a user, who
wanted to access a local directory "/ssh:example.com/", see
bug#31489. Achhhh ...

Best regards, Michael.





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 23:38             ` Kévin Le Gouguec
@ 2020-12-26  8:52               ` Michael Albinus
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Albinus @ 2020-12-26  8:52 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Lars Ingebrigtsen, 45402, rms

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

Hi Kévin,

> I might be missing something, but it seems to me like there is a rather
> large design space for opt-in, backward-compatible ways to disambiguate
> Tramp methods: off the top of my head, I could imagine e.g. a variable
> (say "tramp-implicit-methods") which

There are people who use Tramp, and there are people who don't. For the
latter, there is tramp-mode. Setting it to nil makes Tramp silent, in
all aspects.

Customizing which Tramp methods shall be used for completion is too
complicate for the majority of users I believe.

> Or we could go the opposite route, with e.g. tramp-explicit-methods (nil
> by default), which in the context of this report could be set to
> '("media") so that /media can complete to /media/$USER, and users would
> be required to type out /trampmedia: explicitly.

This exists already. Remove the "media" entry from tramp-methods, and
you're done.

Best regards, Michael.





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-25 11:06     ` Michael Albinus
@ 2020-12-26 10:22       ` Richard Stallman
  2020-12-26 10:28         ` Michael Albinus
  0 siblings, 1 reply; 23+ messages in thread
From: Richard Stallman @ 2020-12-26 10:22 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 45402

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > The mount protocols are different depending on the device, they could be
  > "mtp" or "gphoto2". In order to hide these details, I have chosen the
  > Tramp connection method "media", which DTRT for whichever protocol. What
  > different Tramp connection name shall I use instead? I'm notorious bad
  > in selecting proper names.

How about /device: ?

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-26 10:22       ` Richard Stallman
@ 2020-12-26 10:28         ` Michael Albinus
  2020-12-27  5:34           ` Richard Stallman
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Albinus @ 2020-12-26 10:28 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 45402

Richard Stallman <rms@gnu.org> writes:

Hi Richard,

>   > The mount protocols are different depending on the device, they could be
>   > "mtp" or "gphoto2". In order to hide these details, I have chosen the
>   > Tramp connection method "media", which DTRT for whichever protocol. What
>   > different Tramp connection name shall I use instead? I'm notorious bad
>   > in selecting proper names.
>
> How about /device: ?

Yes, that was something I took into account when I'vge created
"/media:". However, people typing "/dev TAB" will also be annoyed,
because it could complete to "/dev/" and to "/device:".

Meanwhile, I'm discussing with myself, whether "/mtp:" is acceptable. It
is the superior protocol. I hope I will win the discussion :-)

Best regards, Michael.





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

* bug#45402: Rename Tramp method "media"
  2020-12-25 22:11         ` bug#45402: Rename Tramp method "media" Kévin Le Gouguec
  2020-12-25 22:35           ` Drew Adams
@ 2020-12-26 11:44           ` Michael Albinus
  1 sibling, 0 replies; 23+ messages in thread
From: Michael Albinus @ 2020-12-26 11:44 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Lars Ingebrigtsen, 45402-done

Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

Hi Kévin,

> I have no expertise whatsoever about these protocols; I only learned
> about them just now.  Are there users we could poll to find a method
> name that makes sense?  I've looked at 2020-01-22 "Add new Tramp method
> "media"" (2d9d62bb24), but I could not see any bug ID, so I don't know
> who we could turn to.

There was no external request, it was my own decision to add this Tramp
method.

Finally, I've converted "media" to "mtp" in Tramp. So what. Closing the bug.

Best regards, Michael.





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

* bug#45402: Rename Tramp method "media"
  2020-12-26  8:44             ` Michael Albinus
@ 2020-12-26 18:53               ` Drew Adams
  0 siblings, 0 replies; 23+ messages in thread
From: Drew Adams @ 2020-12-26 18:53 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Lars Ingebrigtsen, 45402, Kévin Le Gouguec

> Once I got a bug report from a user, who wanted
> to access a local directory "/ssh:example.com/",
> see bug#31489. Achhhh ...

Yowza!   ;-)





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

* bug#45402: 28.0.50; new completion inconvenience
  2020-12-26 10:28         ` Michael Albinus
@ 2020-12-27  5:34           ` Richard Stallman
  0 siblings, 0 replies; 23+ messages in thread
From: Richard Stallman @ 2020-12-27  5:34 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 45402

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Yes, that was something I took into account when I'vge created
  > "/media:". However, people typing "/dev TAB" will also be annoyed,
  > because it could complete to "/dev/" and to "/device:".

I thought about that and concluded that there is little occasion to
enter /dev in a minibuffer in Emacs.  (Have you ever done so?)
So it is a potential problem that won't actually happen, and that makes
it ok.

  > Meanwhile, I'm discussing with myself, whether "/mtp:" is acceptable. It
  > is the superior protocol. I hope I will win the discussion :-)

I see no problem with it.


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

end of thread, other threads:[~2020-12-27  5:34 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24  5:53 bug#45402: 28.0.50; new completion inconvenience Richard Stallman
2020-12-24  5:58 ` Jean Louis
2020-12-24  8:53 ` Michael Albinus
2020-12-24 14:36   ` Eli Zaretskii
2020-12-24 17:02     ` Michael Albinus
2020-12-24 17:18       ` Eli Zaretskii
2020-12-25  4:42   ` Richard Stallman
2020-12-25 11:06     ` Michael Albinus
2020-12-26 10:22       ` Richard Stallman
2020-12-26 10:28         ` Michael Albinus
2020-12-27  5:34           ` Richard Stallman
2020-12-25  5:56 ` Lars Ingebrigtsen
2020-12-25 11:17   ` Michael Albinus
2020-12-25 11:20   ` Kévin Le Gouguec
2020-12-25 19:31     ` Lars Ingebrigtsen
2020-12-25 20:31       ` Michael Albinus
2020-12-25 22:11         ` bug#45402: Rename Tramp method "media" Kévin Le Gouguec
2020-12-25 22:35           ` Drew Adams
2020-12-25 23:38             ` Kévin Le Gouguec
2020-12-26  8:52               ` Michael Albinus
2020-12-26  8:44             ` Michael Albinus
2020-12-26 18:53               ` Drew Adams
2020-12-26 11:44           ` 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).