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: Fri, 1 May 2015 06:54:33 +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 1430456101 32483 80.91.229.3 (1 May 2015 04:55:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 04:55:01 +0000 (UTC) Cc: help-gnu-emacs To: Stefan Monnier , Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 01 06:54:49 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 1Yo2yN-0003JV-On for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 06:54:47 +0200 Original-Received: from localhost ([::1]:46743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo2yN-0000BB-8C for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 00:54:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo2yD-0000B5-H1 for help-gnu-emacs@gnu.org; Fri, 01 May 2015 00:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yo2yC-0005hb-CY for help-gnu-emacs@gnu.org; Fri, 01 May 2015 00:54:37 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:34559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo2yA-0005hG-Gy; Fri, 01 May 2015 00:54:34 -0400 Original-Received: by laat2 with SMTP id t2so58694874laa.1; Thu, 30 Apr 2015 21:54:33 -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=RR4fI9iiAh5M2KhX2GGM/ud/nqrKeSIgCPEoZHgzPXs=; b=ly7+TFsEik8p2Ad99Bu+FbyYnVw6WgLuw+8eaNq9pcmxmjvmxQDjrsPRo8mk3WAXPZ gFzHm+xqkeZF/a1Fcz3wVJ8gLNH+m7UbCs0K7jqLw+QhjJbZ4wH4glTgS20zRV2gDAtn aDBhih+L/GCJ4l3G3+nOfWMz1hy4Ivawh3jZpMt8hxoDFTe7T2iwO7eUNQyGn6pHYe3K UhOwLm2xuy2zWDmJ6agvqDh6EcGWPWy3NIor8Zh2/6g9ctxeojds6gYCrEF2mF/X4H4a N+WeHoE+o9AWC2xj3azw67lbEiXmKY9p7+SJpLnJHpiI/JJEAity2gfu4plLaH64X6Px 9ujg== X-Received: by 10.152.2.38 with SMTP id 6mr6894642lar.80.1430456073699; Thu, 30 Apr 2015 21:54:33 -0700 (PDT) Original-Received: by 10.112.36.103 with HTTP; Thu, 30 Apr 2015 21:54:33 -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:c03::22b 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:104127 Archived-At: The only stanza that works properly so far is this simple one: (setq-default minibuffer-line-format '((:eval (propertize (format-time-string "%Y.%m.%d") 'face 'minibuffer-line-date)) " " (:eval (propertize (format-time-string "%A") 'face 'minibuffer-line-weekday)) " " (:eval (propertize (format-time-string "%R") 'face 'minibuffer-line-time)))) So how do I actually right justify that now? On Fri, May 1, 2015 at 6:49 AM, Alexander Shukaev wrote: > I came up with the following code to right-justify: > > =E2=80=8B (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 > (length ,string))))) > string))))) > =E2=80=8B > But it does not do what it should do. Faces are not propagated and > alignment too. What's wrong with this code? >