[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mode-line with Tramp
From: |
Nick Roberts |
Subject: |
Re: mode-line with Tramp |
Date: |
Tue, 24 Jul 2007 10:46:31 +1200 |
> > > Maybe it would be better to use "@" instead of "R" to indicate the
> > remote
> > > directory?
> > >
> > > -RRR:address@hidden
> > >
> > > I prefer @.
> >
> > OK I've committed a patch with "@".
>
> Not a big deal, but wouldn't it be better to use %@ format instead of %R
> for consistency with its display in the mode line?
Well, %R isn't a user level change (mode-line-format is described in the
Elisp manual, not the Emacs manual). I had thought there might be a clash
but there isn't, so I could do this as there is no cost.
Currently the double-end arrow pointer shape that indicates the mode-line
can be dragged obscures the character underneath. How about the change
below? I realise that Richard thinks that mixing the mouse and keyboard is
bad UI (although Emacs already does this from the menu-bar and, now with
vc-mode, from the mode-line with some VC commands) but it changes the
pointer shape to a hand and gives functionality consistent with the bindings
for the two previous characters on the mode line (mode-line-toggle-read-only
and mode-line-toggle-modified) which I think is good UI.
--
Nick http://www.inet.net.nz/~nickrob
*** bindings.el 23 Jul 2007 11:01:09 +1200 1.179
--- bindings.el 24 Jul 2007 10:24:57 +1200
*************** corresponding to the mode line clicked."
*** 74,79 ****
--- 74,90 ----
(force-mode-line-update)))
+ (defun mode-line-cd (event)
+ "Make DIR become the current buffer's default directory.
+ See `cd'."
+ (interactive "e")
+ (save-selected-window
+ (select-window (posn-window (event-start event)))
+ (let ((arg (read-from-minibuffer "Change default directory: ")))
+ (cd arg))
+ (force-mode-line-update)))
+
+
(defun mode-line-widen (event)
"Widen a buffer from the mode-line."
(interactive "e")
*************** Normally nil in most modes, since there
*** 250,265 ****
(defvar mode-line-remote
(list (propertize
! "%1R"
'help-echo (purecopy (lambda (window object point)
(format "%s"
(save-selected-window
(select-window window)
(concat
! (if (file-remote-p default-directory)
! "Remote: "
! "Local: ")
! default-directory)))))))
"Mode-line flag to show if default-directory for current buffer is remote.")
(make-variable-buffer-local 'mode-line-remote)
--- 261,277 ----
(defvar mode-line-remote
(list (propertize
! "%1@"
'help-echo (purecopy (lambda (window object point)
(format "%s"
(save-selected-window
(select-window window)
(concat
! default-directory
! ": mouse-1 changes")))))
! 'local-map (purecopy (make-mode-line-mouse-map
! 'mouse-1 #'mode-line-cd))
! 'mouse-face 'mode-line-highlight))
"Mode-line flag to show if default-directory for current buffer is remote.")
(make-variable-buffer-local 'mode-line-remote)
- Re: mode-line with Tramp, (continued)
- Re: mode-line with Tramp, Richard Stallman, 2007/07/22
- Re: mode-line with Tramp, Nick Roberts, 2007/07/22
- Re: mode-line with Tramp, Michael Albinus, 2007/07/23
- Re: mode-line with Tramp, Nick Roberts, 2007/07/23
- Re: mode-line with Tramp, Richard Stallman, 2007/07/23
- Re: mode-line with Tramp, Nick Roberts, 2007/07/23
- Re: mode-line with Tramp, Juri Linkov, 2007/07/23
- Re: mode-line with Tramp,
Nick Roberts <=
- Re: mode-line with Tramp, Nick Roberts, 2007/07/25
- Re: mode-line with Tramp, Juri Linkov, 2007/07/26
- Re: mode-line with Tramp, Richard Stallman, 2007/07/26
- Re: mode-line with Tramp, Johan Bockgård, 2007/07/27
- Re: mode-line with Tramp, Nick Roberts, 2007/07/27
- Re: mode-line with Tramp, Michael Albinus, 2007/07/20
- Re: mode-line with Tramp, Richard Stallman, 2007/07/21
- Re: Tramp with GUD broken on trunk?, Michael Albinus, 2007/07/13
- Re: Tramp with GUD broken on trunk?, Nick Roberts, 2007/07/12