Subject: Re: bug#44963: 28.0.50; tramp over scp: text is read only on some apparently random lines

From: Jean Louis <[email-masked]>
Date: Mon, 30 Nov 2020 21:54:08 +0300

* Michael Albinus <[email-masked]> [2020-11-30 21:37]:
> Jean Louis <[email-masked]> writes:
> 
> Hi Jean,
> 
> > I have noticed that I cannot edit remote files easily with {C-x C-q} as
> > when doing it remotely, apparently random lines become read-only, then
> > from those lines below I can edit .vim line but not .viminfo and none of
> > the subsequent lines. There is no visible pattern to me why I cannot
> > edit files in Dired over Tramp scp/ssh
> >
> > Here below I could edit first line and directory smos.cs-syd.ue but the
> >   second line smos.tar.gz is read only and then all
> >   drwxr-xr-x 12 admin admin      4096 Nov 26 23:12 smos.cs-syd.eu
> >   -rw-r--r--  1 admin admin    247856 Nov 26 23:22 smos.tar.gz
> >   drwx------  2 admin admin      4096 Nov 27 00:23 .ssh
> >   drwxr-xr-x  3 admin admin      4096 Nov 24  2016 .subversion
> >   drwxr-xr-x  3 admin admin      4096 Sep 15 19:03 sync
> >   drwx------  3 admin admin      4096 Sep 26 22:46 .telegram-cli
> >   drwxr-xr-t  2 admin admin      4096 Oct 24 22:25 tmp
> >   -rw-------  1 root  root   26136504 Oct 20  2019 VID_20190324_103021.3gp
> >   drwxr-xr-x  2 admin admin      4096 Feb 18  2016 .vim
> >   -rw-------  1 admin admin     12853 Jun 10  2018 .viminfo
> >   drwx------  2 admin admin      4096 Jan 19  2016 .w3m
> >   -rw-r--r--  1 admin admin       631 Oct 31 03:35 .wget-hsts
> >   -rw-------  1 admin admin        73 Sep 15 18:55 .Xauthority
> >   -rw-r--r--  1 admin admin     47700 Nov  5 04:09 .zcompdump
> >   -rw-------  1 admin admin        36 Nov  5 04:10 .zsh_history
> >   -rw-r--r--  1 admin admin      1335 Jan 16  2016 .zshrc
> 
> Sorry, I don't understand. What do you intend to edit? The directory
> buffer? Files in that directory?

I cannot reproduce it. I was using emacs -Q to edit files over Tramp
and now I am sorry I cannot reproduce it. I know that I placed ~ on
the end of the file to test different functionaliy to try deleting it,
related to old bug. Then I removed ~ and after few moments of testing
some lines I could not delete.

I am editing Dired buffers by using:

C-x C-q runs the command dired-toggle-read-only (found in
dired-mode-map), which is an interactive compiled Lisp function in
‘dired.el’.

It is bound to C-x C-q.

(dired-toggle-read-only)

Edit Dired buffer with Wdired, or make it read-only.
If the current buffer can be edited with Wdired, (i.e. the major
mode is ‘dired-mode’), call ‘wdired-change-to-wdired-mode’.
Otherwise, toggle ‘read-only-mode’.

> Anyway, pls use "emacs -Q", set tramp-verbose to 6, and run your
> recipe. Tell us the recipe, and show us the debug buffer.