From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Re: Emacs calendar to display nth weekay in month, e.g. every 3rd Wednesday Date: Sun, 11 Jan 2015 15:37:26 -0500 Message-ID: <87twzxdpfd.fsf@gmail.com> References: <54B2D702.3020307@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421008686 32122 80.91.229.3 (11 Jan 2015 20:38:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Jan 2015 20:38:06 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Eliachevitch Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 11 21:38:01 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 1YAPGq-0002Bz-VX for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Jan 2015 21:38:01 +0100 Original-Received: from localhost ([::1]:59302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAPGq-0006O7-Bv for geh-help-gnu-emacs@m.gmane.org; Sun, 11 Jan 2015 15:38:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAPGM-00064w-Vv for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 15:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAPGM-00085C-20 for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 15:37:30 -0500 Original-Received: from mail-yk0-x22e.google.com ([2607:f8b0:4002:c07::22e]:37140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAPGL-000858-Uf for help-gnu-emacs@gnu.org; Sun, 11 Jan 2015 15:37:29 -0500 Original-Received: by mail-yk0-f174.google.com with SMTP id 10so7862810ykt.5 for ; Sun, 11 Jan 2015 12:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ezDWsN7V95kOyNddYH2B5wtTbqzds1/pIZynSEB8eBs=; b=jdNR5Xdfi05lJyprb5z73g2Tcwot6TAKyJD1aImthKC1x2fYWolo46m+Bo3tpq5pju iNo+r1Iu+lWYeoNnFe5mGFDCJQlmo9TOi7jLTpNck2w6N9R9K/WxOx9J2spSK/ZgCaMG yRWZo9ozAI8CxxbuXkLwZHaEyq1PKzhUwrtRq1WHQwFQK3jHNSyMD2FUVZ1dS9DF59H5 6iLjzaiFXUwYX7HPjil4q/qEiCzKaG+GDbKbjWl+SLTlkt+vnIPkTcT42jCYoRK0ntLe s7WAHkWT0X9I12T711tIb6DPHetan5RGfeV3tL26dOuWybC8OFk1neiZUGn2T9Mqi8RY EKEg== X-Received: by 10.170.136.129 with SMTP id d123mr23327045ykc.31.1421008648925; Sun, 11 Jan 2015 12:37:28 -0800 (PST) Original-Received: from localhost.localdomain ([2601:0:a000:4a1:ee55:f9ff:feb5:5589]) by mx.google.com with ESMTPSA id k61sm9130811yho.44.2015.01.11.12.37.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 12:37:27 -0800 (PST) In-Reply-To: <54B2D702.3020307@gmx.net> (Michael Eliachevitch's message of "Sun, 11 Jan 2015 21:03:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22e 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:102003 Archived-At: I accomplish this using Org-mode agenda for all my calendaring (highly recommend it) and lines like the following in an agenda-loaded org file: ** 8:00-9:00 Ward Council Meeting: 2nd and 4th Sunday <%%(diary-float t 0 2)> <%%(diary-float t 0 4)> Does that help? For me, probably 85% of my emacs usage is org-mode (planning, note-taking, powerpoint/doc generation); it ships with emacs, so if you haven't looked into it yet, I would strongly recommend it. They also have a mailing list parallel to this one. - Tory Michael Eliachevitch writes: > Hi, > > There are several events for me each month which take place for example > on the 3rd Wednesday or on the first Tuesday of each month. Is there > some way to add them to my diary file, so that they will be added to the > list of diary entries and displayed in the calendar for all dates to > which this rule applies? > > Maybe there is already some functionality to do this, but I haven't > found it yet. At least it's justnot a simple regex on the date. If > there is something like this, I would like to know. > > I am actually a newbie when it comes to programming in emacs lisp. I > have just started this week. I managed to create a function that checks > if a date is for example a 3rd Wednesday, but I am still not sure how to > combine it with the diary. I would have to implement some special syntax > for entering it into the diary file and add some regexes for that and > should study the diary code more... I still haven't figured out how > entries are added to the diary-entries-list. > > So if somebody who knows the emacs calendar could provide some help or > hints, I would be really thankful. > > Greetings, > Michael