From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: Minibuffer tray to display current time and date Date: Tue, 12 May 2015 13:34:20 +0200 Message-ID: References: <87h9s7hd7a.fsf@debian.uxu> <87383qvoi4.fsf@debian.uxu> <874mo6bgzx.fsf@debian.uxu> <20150424141319.GA19093@tuxteam.de> <831tj9zizy.fsf@gnu.org> <87ioclo9p5.fsf@yale.edu> <83wq11xyiu.fsf@gnu.org> <87h9s3havb.fsf@yale.edu> <83bnibx7wy.fsf@gnu.org> <871tj4xhhe.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1431430480 22929 80.91.229.3 (12 May 2015 11:34:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 May 2015 11:34:40 +0000 (UTC) Cc: help-gnu-emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 12 13:34:40 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ys8SM-0005VO-Ig for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2015 13:34:38 +0200 Original-Received: from localhost ([::1]:42216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys8SL-0001GB-Oj for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2015 07:34:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys8S7-0001G1-WF for help-gnu-emacs@gnu.org; Tue, 12 May 2015 07:34:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ys8S6-0001Sw-JA for help-gnu-emacs@gnu.org; Tue, 12 May 2015 07:34:23 -0400 Original-Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:34511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ys8S6-0001S4-6c for help-gnu-emacs@gnu.org; Tue, 12 May 2015 07:34:22 -0400 Original-Received: by lbcga7 with SMTP id ga7so3393690lbc.1 for ; Tue, 12 May 2015 04:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KkM5sB4xSosanpkuH/uJhQ7SE1jONgCHiYtjCR0Tm2A=; b=WSBlSh3Hf94Fj9sXu7a73TsYaVj+myvjxg7p5BpQgXifvbmRJnXTJYkVtou3rszXnU nDKyZlt7yFRusWJiUbOJkoCMb4sISPHkErrrPJI+/4Of8bHjZ+UAn1pflgtipwJb3Fqa MQJJHUAlqsuvQdFeht7MziGXix2elNT9uCFlrtQX0RxNi06ZwSWqAhT+NBhbP2vmrYY4 fsWYHIMLcbY/uiNwYZ9L5ZnZGdND9u57ntVv2x1AZbtl9bWcwdkua6EHIAMzBXx2Sule uE4LC8wJZu/nG3I41AmvdJ3l6ct0HTEtdqsyQOH4N2JUTwkm5Dfnm0Olju1UwyHTf6mv XAcg== X-Received: by 10.112.171.68 with SMTP id as4mr11786843lbc.64.1431430460342; Tue, 12 May 2015 04:34:20 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Tue, 12 May 2015 04:34:20 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104417 Archived-At: On Wed, May 6, 2015 at 2:49 PM, Stefan Monnier wrote: > > `((space :align-to > > (- right > > (length ,string)))= )) > > If you look at the documentation for the display property, and more > specifically for the `space' specifications, you'll see that the HPOS > element can be of the form: > > EXPR ::=3D NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM > NUM ::=3D INTEGER | FLOAT | SYMBOL > UNIT ::=3D in | mm | cm | width | height > ELEM ::=3D left-fringe | right-fringe | left-margin | right-margin > | scroll-bar | text > POS ::=3D left | center | right > FORM ::=3D (NUM . EXPR) | (OP EXPR ...) > OP ::=3D + | - > > So, as you can see, there is no "(length EXP)" form in there.So you need > to use > > ,(length string) > > instead of > > (length ,string) > > > -- Stefan > =E2=80=8B Thanks for this remark, Stefan. I've modified the code and it looks =E2=80=8Bnow =E2=80=8B as follows: (setq-default minibuffer-line-format `((:eval (let ((string (concat (propertize (format-time-string "%Y.%m.%d") 'face 'minibuffer-line-date) " " (propertize (format-time-string "%A") 'face 'minibuffer-line-weekday) " " (propertize (format-time-string "%R") 'face 'minibuffer-line-time)))) (concat (propertize " " 'display `((space :align-to (- right right-fringe ,(length string))))) string))))) It is aligned correctly now, but the faces are still not propagated, or rather only the first one is (the default one from `display' alignment). I feel like I don't understand something fundamental about `eval:' or maybe there is a bug here? I'd be grateful if you could explain this problem. Thank you. Regards, Alexander