From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Toggle appointment notification Date: Fri, 4 Dec 2020 02:49:59 +0300 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: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 04 00:53:35 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 1kkyPn-000437-MB for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 04 Dec 2020 00:53:35 +0100 Original-Received: from localhost ([::1]:53778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkyPm-0007do-MI for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 03 Dec 2020 18:53:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkyMy-00057R-9m for help-gnu-emacs@gnu.org; Thu, 03 Dec 2020 18:50:40 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:35179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkyMv-0003xo-TZ for help-gnu-emacs@gnu.org; Thu, 03 Dec 2020 18:50:39 -0500 Original-Received: from localhost ([::ffff:197.157.0.57]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0006.000000005FC979CB.00006BAA; Thu, 03 Dec 2020 23:50:34 +0000 Content-Disposition: inline In-Reply-To: <875z5ibigp.fsf@web.de> Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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:125932 Archived-At: * Michael Heerdegen [2020-12-04 02:05]: > pietru@caramail.com writes: > > > Fair enough, but the response could easily be interpreter to be > > addressed to us rather than to every emacs user. I understand we > > asked for points of view, but that was after Michael informed us that > > he was planning some work on diary appointments and he asked me for > > suggestions on our planned use and strategy. Emanuel confirmed that > > changes will became part of the official release. > > I'm sorry, but there was some misunderstanding. I'm a user of calendar, > diary, org and diary, and plan to donate some related stuff to Gnu > Elpa. I dunno to what Emanuel answered. > > I'm interested in making diary expressions more common and useful. I > want to have something better than appointments, and a better > integration of these things with Org. But I'm not an Org developer. > > I'm just curious about how people are currently using this stuff, as an > inspiration for the direction of development of my stuff, so that it may > end up in something useful for others. {M-x appt-add} While called `appointments' it may be used for any type of daily alarm or notification. I find warnings or alarms useful. User may write something and be focused and is then reminded of appointment. Or bread being baken. Or child that has to be driven from kindergarten. (appt-add TIME MSG &optional WARNTIME) Probably introduced at or before Emacs version 23.3. Add an appointment for today at TIME with message MSG. The time should be in either 24 hour format or am/pm format. Optional argument WARNTIME is an integer (or string) giving the number of minutes before the appointment at which to start warning. The default is ‘appt-message-warning-time’. I am currently thinking same as you, how to streamline and shorten and make faster actions of life and education of others. If you have structured data to deal with it is good to use databases. My planning of personal stuff is in this direction: - reminders is database table that accepts general input, be it for appointments, tasks, any kind of reminder. It has to repeat itself at specific intervals and it has to have features to use SMS, email, and by sound spoken notifications. Cron job or Emacs command `run-with-idle-timer' can be used from time to time to run reminders job of sending notifications. - I have a hyperdocument database table (hlinks) and hyperdocument types (hlinktypes), then I define the type of it. It can be anything. So it can be appointment. It can be task assigned to person, note, PDF, Org file, paragraph, or just WWW hyperlink, message ID, annotation. I recommend using that approach. - then by using smart intersection location one can find anything one want. When having reminder, alert, warning, notifications, or binding it to one or two keys that is where it becomes interesting. - DragonflyBSD operating system has nifty features for administrator that gets full report by local email about system securities. - 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 1. I recommend using database approach. It can be GDBM database. It can be PostgreSQL, MySQL, SQLite or something similar. Develop your first table and play with it. Then start storing information. 2. After a while of playing and exploring, develop table what you need and want. 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 ); First make some functions to insert new appointmens: (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, appointments_title, appointments_description) VALUES (%s,%s,%s)" time-date title description))) (rcd-sql sql *db*))) 3. Then start making few functions until you get the feeling. List appointments chronologically and in reverse. When SQL query is: SELECT * FROM appointments ORDER BY appointments_timestamp; Emacs Lisp function looks like: (defun appointments-by-date () "Returns list of appointments" (let ((sql "SELECT * FROM appointments ORDER BY appointments_timestamp;")) (rcd-sql-list sql *db*))) Advantage of the databases is: - that you may access appointments from almost any programming language - that you may replicate database to other databases - that it is multi-user system, for example group could be scheduling appointments and collaborating - that you may access databases remotely, you may use mobile device - high speed data access for large amounts of records quickly and efficiently - 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. They are available in every GNU/Linux distribution and BSD derivatives and other operating systems. - In general databases work well across various devices. It means their data can be exported, moved, transformed to other data. 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. - databases are very reliable and easy to backup. More reading: https://www.postgresql.org/about/ Jean