From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Minibuffer tray to display current time and date Date: Tue, 12 May 2015 19:24:57 +0200 Organization: Aioe.org NNTP Server Message-ID: <87zj591zfa.fsf@debian.uxu> 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 X-Trace: ger.gmane.org 1431451219 4102 80.91.229.3 (12 May 2015 17:20:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 May 2015 17:20:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 12 19:20:19 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 1YsDqr-0005zX-T4 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2015 19:20:18 +0200 Original-Received: from localhost ([::1]:44138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsDqr-0002QD-6w for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2015 13:20:17 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:JeIc8wtDs0VXXDOfXquzk6clE0k= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:212135 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:104420 Archived-At: Alexander Shukaev writes: > (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. Try 'font-lock-face instead of 'face: (insert (propertize "Type'd up" 'font-lock-face 'font-lock-type-face)) As for :eval that doesn't do anything. It is just a marker that says this should be evaluated (each time) but this has to be implemented in each case (or "somewhere else" if this is a convention - its in `mode-line-format' as well). The reason you can't do it with a backtick and commas is if so that would evaluate only once (when you `setq' the variable) but as time (sadly) flies, you want it to be set each time and this has to be implemented, and :eval is one way to do so. -- underground experts united http://user.it.uu.se/~embe8573