From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#4217: 23.1; probable mode-line bug Date: Tue, 25 Aug 2009 13:29:06 -0400 Message-ID: <19092.8034.606896.137201@winooski.ccs.neu.edu> References: <77my5o8u9x.fsf@fencepost.gnu.org> <19091.24299.377086.91288@winooski.ccs.neu.edu> Reply-To: Eli Barzilay , 4217@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251222479 6760 80.91.229.12 (25 Aug 2009 17:47:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2009 17:47:59 +0000 (UTC) Cc: 4217@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 25 19:47:52 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mg07b-00043l-UA for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Aug 2009 19:47:52 +0200 Original-Received: from localhost ([127.0.0.1]:44465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mg07b-0001em-Ag for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Aug 2009 13:47:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mg06m-0000ai-Ud for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2009 13:47:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mg06i-0000TP-04 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2009 13:47:00 -0400 Original-Received: from [199.232.76.173] (port=59834 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mg06h-0000Sx-Nj for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2009 13:46:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52276) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mg06h-00041i-32 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2009 13:46:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7PHkqFW002001; Tue, 25 Aug 2009 10:46:53 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7PHZ45b032688; Tue, 25 Aug 2009 10:35:04 -0700 Resent-Date: Tue, 25 Aug 2009 10:35:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Barzilay Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 25 Aug 2009 17:35:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4217 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4217-submit@emacsbugs.donarmstrong.com id=B4217.125122134831935 (code B ref 4217); Tue, 25 Aug 2009 17:35:04 +0000 Original-Received: (at 4217) by emacsbugs.donarmstrong.com; 25 Aug 2009 17:29:08 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7PHT7i4031932 for <4217@emacsbugs.donarmstrong.com>; Tue, 25 Aug 2009 10:29:08 -0700 Original-Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1MfzpS-00039C-Jt; Tue, 25 Aug 2009 13:29:06 -0400 In-Reply-To: X-Mailer: VM 8.0.12 under 23.1.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 25 Aug 2009 13:47:00 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30556 Archived-At: On Aug 25, Glenn Morris wrote: > Eli Barzilay wrote: > > > I thought that having them at the front makes more sense -- due to the > > following "-%-". > > I assumed the actual problem you wanted to report was that in: > > emacs -Q -f which-func-mode --eval '(setq global-mode-string "foo")' lisp/startup.el > > there are 4 "-" characters between which-func's '[...]' and the > global-mode-string. Yes, that's the result of the bad placement of dashes. > Since mode-line-modes already ends in "--", moving the dashes to the > front of which-func will just shift the 4 "-" around rather than > reducing them to 2. I missed this, mostly because I just looked at the code that *looked* like it has a problem. Anyway, in this case the obvious solution is to remove the last two dashes from `mode-line-modes'. This means that the relevant code: (propertize " " 'help-echo help-echo) 'mode-line-modes `(which-func-mode ("" which-func-format ,dashes)) `(global-mode-string (,dashes global-mode-string)) (propertize "-%-" 'help-echo help-echo) works fine in all cases. > Although the "--" at the end of the global-mode-string entry are not > necessary (being followed by -%-), I think it makes sense to have > all the entries be the same, so that entries can be > removed/added/reordered easily. Yes, having all entries be the same is definitely the answer -- but this should apply to everything except for the first or the last in the chain (depending on using the dashes before/after), and moving the dashes to the front and making `mode-line-modes' not end with dashes seems to me as a better choice. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life!