From: Nick Roberts <nickrob@snap.net.nz>
To: Juri Linkov <juri@jurta.org>
Cc: michael.albinus@gmx.de, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: mode-line with Tramp
Date: Tue, 24 Jul 2007 10:46:31 +1200 [thread overview]
Message-ID: <18085.12231.399875.927290@kahikatea.snap.net.nz> (raw)
In-Reply-To: <87vecaga2m.fsf@jurta.org>
> > > Maybe it would be better to use "@" instead of "R" to indicate the remote
> > > directory?
> > >
> > > -RRR:%%@-R
> > >
> > > 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)
next prev parent reply other threads:[~2007-07-23 22:46 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 8:51 Tramp with GUD broken on trunk? Nick Roberts
2007-07-09 10:10 ` Michael Albinus
2007-07-09 10:35 ` Nick Roberts
2007-07-09 11:20 ` Michael Albinus
2007-07-10 2:03 ` Nick Roberts
2007-07-10 4:42 ` Michael Albinus
2007-07-10 14:14 ` Stefan Monnier
2007-07-10 14:39 ` Michael Albinus
2007-07-10 15:04 ` Stefan Monnier
2007-07-10 15:14 ` Michael Albinus
2007-07-10 18:14 ` Stefan Monnier
2007-07-10 19:55 ` Michael Albinus
2007-07-10 22:27 ` Nick Roberts
2007-07-11 2:10 ` Nick Roberts
2007-07-11 5:59 ` Michael Albinus
2007-07-11 7:44 ` Nick Roberts
2007-07-11 7:58 ` Michael Albinus
2007-07-11 19:42 ` Michael Albinus
2007-07-11 22:32 ` Nick Roberts
2007-07-12 15:36 ` Michael Albinus
2007-07-12 21:17 ` Michael Albinus
2007-07-12 22:40 ` Nick Roberts
2007-07-12 22:39 ` mode-line with Tramp [was: Re: Tramp with GUD broken on trunk?] Nick Roberts
2007-07-15 9:20 ` mode-line with Tramp Michael Albinus
2007-07-16 23:17 ` Nick Roberts
2007-07-17 12:32 ` Michael Albinus
2007-07-18 8:43 ` Nick Roberts
2007-07-19 10:35 ` Michael Albinus
2007-07-19 21:21 ` Richard Stallman
2007-07-19 23:28 ` Nick Roberts
2007-07-21 4:52 ` Richard Stallman
2007-07-21 9:07 ` Nick Roberts
2007-07-21 9:33 ` Eli Zaretskii
2007-07-22 1:49 ` Richard Stallman
2007-07-21 9:46 ` Eli Zaretskii
2007-07-21 23:12 ` Nick Roberts
2007-07-22 18:36 ` Richard Stallman
2007-07-21 19:04 ` Juri Linkov
2007-07-21 20:20 ` David Kastrup
2007-07-21 23:10 ` Nick Roberts
2007-07-22 18:36 ` Richard Stallman
2007-07-22 19:24 ` Michael Albinus
2007-07-22 22:39 ` Nick Roberts
2007-07-22 21:47 ` Juri Linkov
2007-07-22 22:36 ` Nick Roberts
2007-07-22 18:36 ` Richard Stallman
2007-07-22 23:25 ` Nick Roberts
2007-07-23 7:56 ` Michael Albinus
2007-07-23 20:58 ` Nick Roberts
2007-07-23 18:06 ` Richard Stallman
2007-07-23 21:28 ` Nick Roberts
2007-07-23 21:34 ` Juri Linkov
2007-07-23 22:46 ` Nick Roberts [this message]
2007-07-25 22:26 ` Nick Roberts
2007-07-26 8:51 ` Juri Linkov
2007-07-26 16:59 ` Richard Stallman
2007-07-27 23:05 ` Johan Bockgård
2007-07-27 23:52 ` Nick Roberts
2007-07-20 6:42 ` Michael Albinus
2007-07-21 4:51 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18085.12231.399875.927290@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=michael.albinus@gmx.de \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.