From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: crash-proof emacs use Date: Wed, 14 Sep 2022 19:49:31 -0700 Message-ID: References: <875yht6o9x.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 04:50:34 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 1oYexW-000A3f-8R for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 04:50:34 +0200 Original-Received: from localhost ([::1]:50656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYexV-0001kv-2I for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 22:50:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYewc-0001kW-6E for help-gnu-emacs@gnu.org; Wed, 14 Sep 2022 22:49:38 -0400 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:37802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYewZ-0000kS-Uu for help-gnu-emacs@gnu.org; Wed, 14 Sep 2022 22:49:37 -0400 Original-Received: by mail-lf1-x133.google.com with SMTP id k10so28168055lfm.4 for ; Wed, 14 Sep 2022 19:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date; bh=7kPD9sFvuKCyMojKVMc6jXQiaXVPZERmXb+iBdFXkwQ=; b=qsSYDRyU10jty+Zuct3j/GYoht69Up4sa50yTYTcssxXH9DaeDuP5EoGxY5Z2Cbsr7 toX+GtvCvsD8OaSW2EuPRagfZLrY2iKBXmv0CN+u0heSzTrJHfSf6xnauroCloIeQPId WRUu3tWL4Gqq9z6ibZAGfw/GMXbd8SnVuUyKFH9Jl+EEpsMo9iPoNz/2Ih3kEy/mJlFU FTwbGZjTuRAUeR0OWCEsKw0gWn5MlQl54Dg7TBvgi3y/2lNvN3pdYkvO0KO2NNwGE8Bm N5cWEUTkF+3aRY+CKk8L7prHEw/jn7bVJHL3/s083eO5a+T9kN0AxbgMdmwnO6G0nOUE rKFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=7kPD9sFvuKCyMojKVMc6jXQiaXVPZERmXb+iBdFXkwQ=; b=vYmHDfLMU4PVPwQJScsO/DFfvVvYF3YRFhQM+IJxw1ConCl8PzMMmv1Ufn4PVVXp37 pEVzQkCfZ6dTvzkZxAgVZPyKfQU60RgjRXZMbuE16Y8g/+61V1zVEkjMxShsst6k+V1P pFI+nO0Wqvm3P4I56tdj2XP0nOSpdL3U2zeBc0dEp9mY8+6gwtqIzBwh9d54eZBA4cF8 hNx/a6X7sguBjqnektZbo6fdUIjoqXdozbBvDDt5WI6tGrYTvIRv0cD1gUcEPK23Rbud unocbqmk8lr2w9JNx/GeWZ7jQu9zkV0FndrqECuVKotLYpwfGhFoj/A6JFFkDjt3regu IRQQ== X-Gm-Message-State: ACgBeo0IM7DJaksSfqJZ+JwTHwVBhFkKEx2dbcoq3oaOoZlgBcWr8Oyt 8F83Fy2T/iGOOZbeMqwEpj0e5pow5EpN9tp+Qc8= X-Google-Smtp-Source: AA6agR5NM628y5DTc6ozpekvcD9b0b15VKJY0LHz2QdaQUk8YHUkaH3Sv/IaRvQRbYyuL8Kfg+nvNzTx5VvepQdlwoo= X-Received: by 2002:a05:6512:b87:b0:498:f223:7906 with SMTP id b7-20020a0565120b8700b00498f2237906mr10668115lfv.664.1663210173338; Wed, 14 Sep 2022 19:49:33 -0700 (PDT) Original-Received: by 2002:aa6:c2eb:0:b0:21e:73da:40af with HTTP; Wed, 14 Sep 2022 19:49:31 -0700 (PDT) In-Reply-To: <875yht6o9x.fsf@mbork.pl> Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=samologist@gmail.com; helo=mail-lf1-x133.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:139463 Archived-At: thanks! i'd say stefan's example here is more or less the canonical/cynosure one for non-crash-proof editing, but i am open to other crash-proof-ness: - kill, with the intent to yank elsewhere - forget all about it - save knowing that i have to remmber and that i might forget or some other thing is stressful and cognitively burdensome even if i do not forget. computers shold be able to do some of that kind of organizing for me. at least that is the idea. editing some part of a sentence doesn't do this to me as much. sending paragraphs elsewhere does. or perhaps it extends to complex org/elisp/bash editing or various types of linking, perhaps ones where stuff has to be kept in sync or all bases need covering. i think it might be related to the "keeping a stack of state in one's head" kind of thing, including cases where it is too inconvenient/bad for rsi to literally keep on top of one's org capture stack. n.b. i always use only one window. but it also has to be convenient and low rsi. idk, lots of possibilities. kill, then hit an f key to say "this kill has to be yanked someplace", maybe. idk. p.s. i just thought of another example of crash-proof-ness. suppose you decide that bef and aft are not sortable, and same with start and end, and start and finish, so you decide to canonicalize on beg and end. and for times, bt and et. so you use query-replace-regexp, which has 2 problems here. one is that you want it for multiple files, which wgrep can help with. although it could perhaps treat all of its matches as if they were in one file. the other is the example. you want to replace all those with beg and all those with end at the same time. you don't want to forget to do the end part for any one of those start parts that you changed. thus, as an example, a crash-proof query-replace-regexp would allow multiple pairs of replacements. perhaps with different colors, one per pair. but this is a less common need than crash-proof moving. btw i am not on this list i think. On 9/12/22, Marcin Borkowski wrote: > > On 2022-09-12, at 04:13, Samuel Wales wrote: > >> suppose you want to move something from one place to another. in org, >> you can often use org-refile. that is more or less an atomic >> operation. but suppose that for whatever reason you cannot do that, >> so you use traditional emacs. > >> [...] > > That is a _very_ interesting idea! I might be tempted to code something > like this (assuming nobody did it earlier, which would not surprise me). > > That said, for a similar reason (it is easy to delete something in Org > and not notice because of all the hiding), I developed a habit of > committing my org-mode files to Git (almost) every day (at least 0.8 > times per day on average, to be more precise). That helps. > > Best, > > -- > Marcin Borkowski > http://mbork.pl > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com