From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pietru@caramail.com Newsgroups: gmane.emacs.help Subject: Re: Toggle appointment notification Date: Fri, 4 Dec 2020 01:28:13 +0100 Message-ID: References: <87h7p4ky4y.fsf@web.de> <875z5jiroy.fsf@web.de> <875z5ibigp.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, Jean Louis To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 04 01:30:42 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkyzh-0004Oi-W4 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 01:30:42 +0100 Original-Received: from localhost ([::1]:55262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkyzg-0005Qw-NL for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 19:30:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkyxt-0005Qq-CS for help-gnu-emacs@gnu.org; Thu, 03 Dec 2020 19:28:49 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:56553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkyxq-00088J-NC for help-gnu-emacs@gnu.org; Thu, 03 Dec 2020 19:28:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607041693; bh=SMJD0Ix1A31R2znB97e/To0BwJJEi3G5ZasCvc9XGxI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U4qs4C0Fm0+y4Ceeol2RXVAbtHgTOEXAewDhMeQbXCGdaU93McRdKV2oinZps+9gV aBPHc4H2BcscS+9zLDsFNQ5wtI9vLASEYGKMOKEVd8gP/9k4+FlZ7qLV1Z5Azz7fDi 1NkojmPLmDD91cI3sP/NCJnWXeWq8z4DAjHtzKAs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Fri, 4 Dec 2020 01:28:13 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:8oGdZk/eHbsLJpNLuY0ZUEjDbLaX1pwJv/PNWVNdi+MrH0pmXjQSzGALihNAe/2NFrF/W buRCm8zRUtzRKyW1qqRvUoe+V5aL90lQkdG/RCiHKpV/fPM48Ii7NXt2nG531tuzDImTBvi3rkq+ fI5QuUE8+39tMM6HCNCi1Xud+BPJyp8tpLCzhnVqqK2mYm05a6E5t542c0beH89rJy14TdrNSRz0 Q02a5PglcR4DlTXduS9DC0LDu6Nmwr1N7rtWA2z09UbMTV3LQOy87++WS1GMqw6CGpU/GugYayxh Ck= X-UI-Out-Filterresults: notjunk:1;V03:K0:mQ/X0OdaRJc=:4E+6AJYSGXMIgeE1EwW7GI UV88JTdxrRAEQhcpQ8sLDUTWXXEAaMjYigZJAdKxbEeRm3CstqMH/4U4cu3IGFBNDIp6HqnHc 3jC73S/vW+guKIOSwuoe1jNi6u0L9yxnhJxDMCSCbVUfC30fVibxEHlN4BRAwQYLqwrS3qfmZ wwEwDOeF8EqZ9Slo82okWxcyfqPhTdpPWlcjaMKnegLDfrSqgFW0KgENerns2Z3O0Z+YCYIz+ izqHjLArO2YEx908+FCfQEsSR4cpOZM0FZvNBOpZgfJG54lA+z4i0F6eMGHfvbpokbsJoCQ+V sDKMWPYYK4/OvLGsmK49P06VmGfoMgo/C9T666/zd/0FCXB87AZ2/9TED2aY0xSVTWIr9trc4 tK+tjyJ6DqE0LN45YisDoNQdzS8QJyg9pGnU17myS1dP0iies4pAPHY1BwM+sLcYANa7bh4Na eJKMzMTYucKYRxjaG3kS9XFft47aYAG4aBqi4nvAUugn4socBvzUe3dc7iQY73jvgnFFTFPza 3e4fejgLKw84JEfWBbA/CR+3vkXJT9SP9Jxpc8YPCAW6eeijhAIg2MzOlCJZuWskNfcWtqq5Q dy27DKibcwN3A= Received-SPF: pass client-ip=212.227.15.18; envelope-from=pietru@caramail.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125935 Archived-At: > Sent: Friday, December 04, 2020 at 12:49 AM > From: "Jean Louis" > To: "Michael Heerdegen" > Cc: help-gnu-emacs@gnu=2Eorg > Subject: Re: Toggle appointment notification > > * Michael Heerdegen [2020-12-04 02:05]: > > pietru@caramail=2Ecom writes: > >=20 > > > Fair enough, but the response could easily be interpreter to be > > > addressed to us rather than to every emacs user=2E I understand we > > > asked for points of view, but that was after Michael informed us tha= t > > > he was planning some work on diary appointments and he asked me for > > > suggestions on our planned use and strategy=2E Emanuel confirmed th= at > > > changes will became part of the official release=2E > >=20 > > I'm sorry, but there was some misunderstanding=2E I'm a user of calen= dar, > > diary, org and diary, and plan to donate some related stuff to Gnu > > Elpa=2E I dunno to what Emanuel answered=2E > >=20 > > I'm interested in making diary expressions more common and useful=2E = I > > want to have something better than appointments, and a better > > integration of these things with Org=2E But I'm not an Org developer= =2E > >=20 > > I'm just curious about how people are currently using this stuff, as a= n > > inspiration for the direction of development of my stuff, so that it m= ay > > end up in something useful for others=2E >=20 > {M-x appt-add} While called `appointments' it may be used for any type > of daily alarm or notification=2E I find warnings or alarms useful=2E Us= er > may write something and be focused and is then reminded of > appointment=2E Or bread being baken=2E Or child that has to be driven fr= om > kindergarten=2E >=20 > (appt-add TIME MSG &optional WARNTIME) >=20 > Probably introduced at or before Emacs version 23=2E3=2E >=20 > Add an appointment for today at TIME with message MSG=2E > The time should be in either 24 hour format or am/pm format=2E > Optional argument WARNTIME is an integer (or string) giving the number > of minutes before the appointment at which to start warning=2E > The default is =E2=80=98appt-message-warning-time=E2=80=99=2E >=20 >=20 > I am currently thinking same as you, how to streamline and shorten and > make faster actions of life and education of others=2E >=20 > If you have structured data to deal with it is good to use databases=2E Ok, it could be=2E But bloody hell, you need to make an sql query=2E And of course SQLight works on binary files=2E It is problematic=2E It could= be made an option, but using text should be kept=2E We often do not have structured data=2E At times we come up with things on the go, and don't have people who would help if things get too technical when things go wrong=2E But with text you can hack things up on the spot and keep working=2E I could be working in a swamp, so not into the cosmetic stuff=2E Other people can use the fancy complex tree stuff=2E There are many instances where it would be an overkill=2E Could you have a look at Gnu Recutils, so we can read and write using rec-format=2E Quite unsure how you are trying to do things, but sounds like office work to me=2E We have no need for people to organise things for us, but for us to organise things as we wish=2E Most times we find that databases are structured for very particular and typical purposes=2E =20 Regards Pietru > My planning of personal stuff is in this direction: >=20 > - reminders is database table that accepts general input, be it for > appointments, tasks, any kind of reminder=2E It has to repeat itself > at specific intervals and it has to have features to use SMS, email, > and by sound spoken notifications=2E Cron job or Emacs command > `run-with-idle-timer' can be used from time to time to run reminders > job of sending notifications=2E >=20 > - I have a hyperdocument database table (hlinks) and hyperdocument > types (hlinktypes), then I define the type of it=2E It can be > anything=2E So it can be appointment=2E It can be task assigned to > person, note, PDF, Org file, paragraph, or just WWW hyperlink, > message ID, annotation=2E I recommend using that approach=2E >=20 > - then by using smart intersection location one can find anything one > want=2E When having reminder, alert, warning, notifications, or > binding it to one or two keys that is where it becomes interesting=2E >=20 > - DragonflyBSD operating system has nifty features for administrator > that gets full report by local email about system > securities=2E >=20 > - Analogous to such daily report it could be automated that user gets > notifications, even that computer uploads symmetrically encrypted > agenda on a website, into the mobile phone, send it by email, send > reminders of tasks by email to people one work with, send them SMS >=20 > 1=2E I recommend using database approach=2E It can be GDBM database=2E I= t > can be PostgreSQL, MySQL, SQLite or something similar=2E Develop your > first table and play with it=2E Then start storing information=2E >=20 > 2=2E After a while of playing and exploring, develop table what you need > and want=2E >=20 > It is not hard: > -- ------------------------------------------ > -- ------------ Table appointments > -- ------------------------------------------ > CREATE TABLE appointments ( > appointments_id SERIAL NOT NULL PRIMARY KEY, > appointments_datecreated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, > appointments_datemodified TIMESTAMP, > appointments_usercreated TEXT NOT NULL DEFAULT current_user, > appointments_usermodified TEXT NOT NULL DEFAULT current_user, > appointments_timestamp TIMESTAMP WITH TIME ZONE NOT NULL, > appointments_title TEXT NOT NULL, > appointments_description TEXT, > appointments_status TEXT > ); >=20 > First make some functions to insert new appointmens: >=20 > (defun appointment-insert () > (let* ((current-date-time (format-time-string "%Y-%m-%d %H:%M")) > (time-date (read-from-minibuffer "Date and time: " current-date-time)) > (title (read-from-minibuffer "Appointment: ")) > (title (sql-escape-string title)) > (description (read-from-minibuffer "Description: ")) > (descrption (sql-escape-string description)) > (sql (format "INSERT INTO appointments (appointments_timestamp,=20 > appointments_title, > appointments_descriptio= n) > VALUES (%s,%s,%s)" > time-date title description))) > (rcd-sql sql *db*))) > =20 > 3=2E Then start making few functions until you get the feeling=2E List > appointments chronologically and in reverse=2E >=20 > When SQL query is: > =20 > SELECT * FROM appointments ORDER BY appointments_timestamp; >=20 > Emacs Lisp function looks like: >=20 > (defun appointments-by-date () > "Returns list of appointments" > (let ((sql "SELECT * FROM appointments ORDER BY appointments_timestamp= ;")) > (rcd-sql-list sql *db*))) >=20 > Advantage of the databases is: >=20 > - that you may access appointments from almost any programming language >=20 > - that you may replicate database to other databases >=20 > - that it is multi-user system, for example group could be > scheduling appointments and collaborating >=20 > - that you may access databases remotely, you may use mobile device >=20 > - high speed data access for large amounts of records quickly and effici= ently >=20 > - databases lessen the coding requirement drastically, they have > built in searches, sorting, intersections and plethora of > functions, sparing user to write substantial amount of > code=2E They are available in every GNU/Linux distribution and > BSD derivatives and other operating systems=2E >=20 > - In general databases work well across various devices=2E It means > their data can be exported, moved, transformed to other > data=2E It is not just Emacs Lisp, it becomes universal data > accessable also from Internet or browsers, command line, from X > programs, and various types of software=2E >=20 > - databases are very reliable and easy to backup=2E >=20 > More reading: > https://www=2Epostgresql=2Eorg/about/ >=20 >=20 > Jean >=20 >=20 >=20 >