9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Silas McCroskey <inkswinc@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] rio consctl behaviour
Date: Wed, 3 Jun 2020 13:00:47 -0700	[thread overview]
Message-ID: <CAHjwAuzGM1W4cR3unC5ZhuKxGk8h86cG2_HVqd3sW2t1_PLp2g@mail.gmail.com> (raw)
In-Reply-To: <CAFSF3XN9-bnbVpUNsy0nw+Q2Qya+itsVkaWecHNFk_wd_OjdXA@mail.gmail.com>

> > I don't see much issue with /rc/bin/hold, other than that it blanks
> > the file on-disk until you exit hold mode, which can lead to
> > surprising problems if you e.g. just close the window without exiting
> > hold mode.
>
> what surprising problems are those? i'm not able to imagine right now

/bin/hold an existing file with contents (not ones you care to keep),
then delete the window (or shut down, end your drawterm session,
whatever) without exiting hold mode.

The file will be left blank, because >path/to/file within the script
truncated it at the *start* of the process, rather than doing
truncate-and-write at the end. No way to retrieve the original other
than to pull it from dump.

I encountered this when I set up a "notes" window in each of my
sub-rios (most of which usually won't have edits in a given session)
and they kept getting lost on session close. I've switched to sam -d
for that (a better choice anyways) and haven't looked back.

Perhaps a more reasonable choice for hold would be to write to a temp
file path and then mv it after completion.

- sam-d


      reply	other threads:[~2020-06-03 20:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 20:25 umbraticus
2020-06-02 20:49 ` [9front] " Ethan Gardener
2020-06-02 21:53   ` umbraticus
2020-06-02 21:57     ` hiro
2020-06-02 22:50       ` Silas McCroskey
2020-06-03  2:01         ` umbraticus
2020-06-03  7:37         ` hiro
2020-06-03 20:00           ` Silas McCroskey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHjwAuzGM1W4cR3unC5ZhuKxGk8h86cG2_HVqd3sW2t1_PLp2g@mail.gmail.com \
    --to=inkswinc@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).