From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: mode-line with Tramp Date: Tue, 24 Jul 2007 10:46:31 +1200 Message-ID: <18085.12231.399875.927290@kahikatea.snap.net.nz> References: <18065.63231.612402.142669@kahikatea.snap.net.nz> <87k5t88258.fsf@gmx.de> <18068.35413.238789.960586@kahikatea.snap.net.nz> <878x9m6825.fsf@gmx.de> <18069.23173.327298.566469@kahikatea.snap.net.nz> <18070.44458.968610.559681@kahikatea.snap.net.nz> <87myxyhvku.fsf@gmx.de> <18075.64647.459220.644967@kahikatea.snap.net.nz> <18077.53954.67784.465789@kahikatea.snap.net.nz> <18079.62390.365307.553494@kahikatea.snap.net.nz> <87zm1po90p.fsf@jurta.org> <18083.59240.112646.133966@kahikatea.snap.net.nz> <87vecaga2m.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185230823 8444 80.91.229.12 (23 Jul 2007 22:47:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2007 22:47:03 +0000 (UTC) Cc: michael.albinus@gmx.de, rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 24 00:47:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ID6g7-0002Eo-ON for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2007 00:47:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID6g7-0006Es-4B for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2007 18:46:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ID6g4-0006Ec-9v for emacs-devel@gnu.org; Mon, 23 Jul 2007 18:46:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ID6g3-0006EC-IX for emacs-devel@gnu.org; Mon, 23 Jul 2007 18:46:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID6g3-0006E9-DJ for emacs-devel@gnu.org; Mon, 23 Jul 2007 18:46:55 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ID6g1-0001WN-KH; Mon, 23 Jul 2007 18:46:54 -0400 Original-Received: from kahikatea.snap.net.nz (123.61.255.123.dynamic.snap.net.nz [123.255.61.123]) by viper.snap.net.nz (Postfix) with ESMTP id 599BE3D9472; Tue, 24 Jul 2007 10:46:47 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 33AB48FC66; Tue, 24 Jul 2007 10:46:32 +1200 (NZST) In-Reply-To: <87vecaga2m.fsf@jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.50.41 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75422 Archived-At: > > > 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)