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: crash-proof emacs use Date: Mon, 12 Sep 2022 09:08:02 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11643"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-06-11) Cc: help-gnu-emacs@gnu.org To: Samuel Wales Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 12 08:10:38 2022 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 1oXceU-0002s1-IR for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 08:10:38 +0200 Original-Received: from localhost ([::1]:37012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXceT-00046n-L5 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Sep 2022 02:10:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXcdP-000459-5r for help-gnu-emacs@gnu.org; Mon, 12 Sep 2022 02:09:31 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:42543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXcdN-0004eB-2n for help-gnu-emacs@gnu.org; Mon, 12 Sep 2022 02:09:30 -0400 Original-Received: from localhost ([::ffff:197.239.4.238]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000B5AC5.00000000631ECD13.00000805; Sun, 11 Sep 2022 23:09:22 -0700 Mail-Followup-To: Samuel Wales , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL=0.141, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:139398 Archived-At: * Samuel Wales [2022-09-12 05:14]: > this is open-ended, but would mean something like, you kill some text > with a "about to move" command so that killing is not conflated with > moving, and it gets marked as "move operation started". then you go > to the location to yank to, and you [if your stm is operating ok] yank > in the new place with a message that this is supposed to be > crash-proof. as part of that yanking, the old text gets deleted. > this is just a silly example. > > there are many flaws in that design, but it is an examlpe of something > i was wondering if anybody has thought about. it is an issue i deal > with frequently. detecting after the fact is ok but there are edge > cases where it is insufficient. > > so it is an open-ended q about whether anybody has implemented > crash-proof moving, or follows some kind of discipline /all the time/, > or some kind of non-theoretical sw for this, and it doesn't require > detecting after the fact. I have something similar where I am entering text in Emacs, then killing the text and yanking in other window. I don't like those texts to disappear, for that reason I am logging them with `rcd-general-log' below. They go into the database. (defun read-to-clipboard () (interactive) (set-input-method my-default-input-method) (let ((clipboard (rcd-ask "Insert into clipboard: ")) (title (concat "Clipboard: " (rcd-timestamp)))) ;; Here (rcd-general-log title clipboard 1 nil nil nil 4) (kill-new clipboard) (rcd-message "Killed: %s" (rcd-substring-soft clipboard 0 40)))) I have different log types: 1 Default 2 Word Lookup 3 E-mail 4 Clipboard 5 DB Column Thus any time later I can revert back to the log and see what was entered in the clipboard. 19459 emacs: message sent Default 19460 Word query: censuring Word Lookup 19461 Clipboard: 2022-06-25-17:03:15 Clipboard 19462 Clipboard: 2022-06-25-17:05:56 Clipboard 19463 Clipboard: 2022-06-25-17:06:31 Clipboard 19464 Clipboard: 2022-06-25-17:07:46 Clipboard Emacs in development version has now SQLite database built-in, it is worth using it to capture pieces of information. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/