From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sven Bretfeld" Newsgroups: gmane.emacs.help Subject: Re: If clause depending on name of the day Date: 3 Apr 2012 22:58:46 +0200 Message-ID: <871uo4v8ft.fsf@gmx.ch> References: <87fwcklhn7.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1333487319 23060 80.91.229.3 (3 Apr 2012 21:08:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2012 21:08:39 +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 Apr 03 23:08:38 2012 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 1SFAxw-0000Bm-GO for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Apr 2012 23:08:36 +0200 Original-Received: from localhost ([::1]:36913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFAoc-0005cX-25 for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Apr 2012 16:58:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFAoW-0005bu-Kx for help-gnu-emacs@gnu.org; Tue, 03 Apr 2012 16:58:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFAoU-0008CW-NP for help-gnu-emacs@gnu.org; Tue, 03 Apr 2012 16:58:52 -0400 Original-Received: from mi.ruhr-uni-bochum.de ([134.147.64.30]:36197 helo=mx6.rz.ruhr-uni-bochum.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SFAoU-0008CJ-En for help-gnu-emacs@gnu.org; Tue, 03 Apr 2012 16:58:50 -0400 X-Queued: (qmail 10167 invoked by alias); 3 Apr 2012 20:58:48 -0000 X-Queued: (qmail 10154 invoked from network); 3 Apr 2012 20:58:48 -0000 Original-Received: from c2-3-4.rz.ruhr-uni-bochum.de (134.147.64.5) by mx6.rz.ruhr-uni-bochum.de with SMTP; 3 Apr 2012 20:58:48 -0000 X-Queued: (qmail 2642 invoked by uid 281); 3 Apr 2012 20:58:48 -0000 X-Qmailscanner: from 178.201.44.149 (0axIjN0NPR8p8mO1GsFOHA==@178.201.44.149) by c2-3-4.rz.ruhr-uni-bochum.de (envelope-from , uid 80) with qmail-scanner-2.01 (sophie: 3.05/3.29/4.75. Clear:RC:1(178.201.44.149):. Processed in 0.036507 secs); 03 Apr 2012 20:58:48 -0000 Original-Received: from ip-178-201-44-149.unitymediagroup.de (HELO kamaloka) (0axIjN0NPR8p8mO1GsFOHA==@178.201.44.149) by c2-3-4.rz.ruhr-uni-bochum.de with (DHE-RSA-AES128-SHA encrypted) SMTP; 3 Apr 2012 20:58:48 -0000 In-Reply-To: <87fwcklhn7.fsf@kuiper.lan.informatimago.com> (Pascal J. Bourguignon's message of "Tue, 03 Apr 2012 21:50:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAACXBIWXMAAABIAAAASABGyWs+ AAAACXZwQWcAAAAwAAAAMADO7oxXAAABvklEQVRYw+1YS46DMAw1EVfpqkuW3IVL9QbchSV3mZkT zCJS6vrzYlpNiDRYXRAn2C/Pn4QOt/tj3xbqRhJAM81re0DD7f4gon1bpnntgarh5+sbTHOUbRBX ALWXVHaff5qhcwCZsTglqzoOGdfyoRnKv5MXhnqo/MQHvMLFQzN5MpR9c4ZOIezJ0L4tuV9rNC15 SmKcQYikbsnTS8iw44ISMMc5xou1PmsSsEVOsA5FMC/2LGt9iplFjSoimnu9/zwcyyAnNTakM4yc Y0es1CVMr3eeslKeZUd7NE47ExameRQruINqPpJTCuLFAgugL1PJ86T18eKP1CMHymdHbNdMGs+9 Jo/rhWOxveIredbzCjMZD5EEGDJfsTs12CsQUG44Gbi4IfMaQRCHORVpEClo6z0oR68x07wmMAes e43fg+vd2UU97ttSYUi/c1QAdNNg5SzjafTJrQi0D454mlf3q0M0VrNZe9ePyB7My0U9ZJheT3Rm VDdcJJTUGGsEn3fe6cSPhqyZ9PrlSirb+YMoXXFM6lmyepXQcyV/6JihTqReZY2/pq+QvQ2o8d9C Ra6QXYD+D6BTSow6rLJfs5d35k++eHwAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTEtMDQtMThUMDE6 MjY6MDcrMDI6MDCXxoTnAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEwLTA1LTAzVDAxOjIxOjI3KzAy OjAwW9UkOQAAAABJRU5ErkJggg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 134.147.64.30 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:84303 Archived-At: Dear all "Pascal J. Bourguignon" writes: > "Sven Bretfeld" writes: > >> Is it possible to have an if-condition that looks for the current day? >> So that the then-expression does something different on Tuesday than on >> Friday? >> >> This is not working: >> >> (if (string-equal 'current-time-string ".*Tue.*") >> (delete-other-windows) >> (split-window-horizontally)) > > What Lars said. > Otherwise you would have wanted: > > (require 'cl) > > (search "Tue" (current-time-string)) ; search a substring > > or: > > (string-match "Tue" (current-time-string)) ; search a regexp. This is working just as I wanted it to. Thank you very much. >> p.s. unnecessary to mention that I have only a weak knowledge of elisp. > > An Introduction to Programming in Emacs Lisp > http://www.gnu.org/software/emacs/emacs-lisp-intro/ > (for non-programmers) Bookmarked for later reading. Thanks. Sven