all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs 24, tramp and history causing sudo tramp to fail
@ 2011-08-31 10:26 Richard Riley
  2011-09-20  9:47 ` Michael Albinus
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Riley @ 2011-08-31 10:26 UTC (permalink / raw
  To: emacs-devel


here's a little bug which I came across and am wondering if I can
configure it out.

Open a file and then re-Open it as root 

I use

(defun find-alternative-file-with-sudo ()
  "Open current buffer as root!"
  (interactive)
  (when buffer-file-name
    (find-alternate-file
     (concat "/sudo:root@localhost:"
	     buffer-file-name))))


edit, save, quit the file.

open some more files.

now C-x C-f and use M-p to find a previous file name in the open
history. The problem is that the tramp sudo line is one of the history elements and
as soon as it comes into the minibuffer input it triggers a background
password process causing all further sudo opens to fail.

regards
r.




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

* Re: emacs 24, tramp and history causing sudo tramp to fail
  2011-08-31 10:26 emacs 24, tramp and history causing sudo tramp to fail Richard Riley
@ 2011-09-20  9:47 ` Michael Albinus
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Albinus @ 2011-09-20  9:47 UTC (permalink / raw
  To: emacs-devel

Richard Riley <rileyrg@googlemail.com> writes:

> here's a little bug which I came across and am wondering if I can
> configure it out.
>
> Open a file and then re-Open it as root 
>
> I use
>
> (defun find-alternative-file-with-sudo ()
>   "Open current buffer as root!"
>   (interactive)
>   (when buffer-file-name
>     (find-alternate-file
>      (concat "/sudo:root@localhost:"
> 	     buffer-file-name))))
>
>
> edit, save, quit the file.
>
> open some more files.
>
> now C-x C-f and use M-p to find a previous file name in the open
> history. The problem is that the tramp sudo line is one of the history elements and
> as soon as it comes into the minibuffer input it triggers a background
> password process causing all further sudo opens to fail.

I've tried your scenario, but the "tramp sudo line" does not go into
`file-name-history'. Could you, please, provide a recipe for reproduction?

Maybe via "M-x report-emacs-bug", which shows the recent keys you have typed.

> regards
> r.

Best regards, Michael.



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

end of thread, other threads:[~2011-09-20  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 10:26 emacs 24, tramp and history causing sudo tramp to fail Richard Riley
2011-09-20  9:47 ` Michael Albinus

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

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.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.