GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Ponies (ponies@mastodon.social)'s status on Friday, 16-May-2025 00:26:29 JST Ponies Ponies
    • Simon Tatham

    @simontatham look I'm following and bookmarking you so 👍

    I have also figured out how to make bash do this without Emacs. Ok it's real.

    I'm just saying the idea of somebody running code and editing it at the same time (despite your use case) is for the most part a fiction, it requires

    1. Editing configuration away from defaults, or
    2. Overwriting the file from within the script whilst it's running

    Edit: some possible setting, maybe
    http://www.gnu.org/s/emacs/manual/html_node/emacs/Backup-Copying.html

    In conversation about a month ago from mastodon.social permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      gnu.org
      Backup Copying (GNU Emacs Manual)
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Friday, 16-May-2025 00:26:25 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Simon Tatham

      @ponies >I'm just saying the idea of somebody running code and editing it at the same time (despite your use case) is for the most part a fiction, it requires [...]

      It is not fiction, and a very common (and known case) case. You have a semi-long running shell script, you run it, and then see something to improve -- edit, and boom. This can lead to real crap too, depending on how far bash has executed the file (not parsed!).

      I'm not sure that @simontatham is a safe way of doing it though.

      In conversation about a month ago permalink
    • Embed this notice
      Ponies (ponies@mastodon.social)'s status on Friday, 16-May-2025 00:47:31 JST Ponies Ponies
      in reply to
      • Alfred M. Szmidt
      • Simon Tatham

      @amszmidt @simontatham The whole discussion was about the real possibility that this will NEVER HAPPEN if somebody did you just said, @amszmidt.

      Editors don't behave this way unless you make them behave that way.

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Friday, 16-May-2025 00:48:56 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Simon Tatham

      @ponies Sorry, bullshit. This has happened to me during this single year multiple times. And this is with default settings on editors, and in this case #GNU Emacs.

      @simontatham

      In conversation about a month ago permalink
    • Embed this notice
      Ponies (ponies@mastodon.social)'s status on Friday, 16-May-2025 00:56:18 JST Ponies Ponies
      in reply to
      • Alfred M. Szmidt
      • Simon Tatham

      @amszmidt @simontatham gnu documentation says otherwise.

      All I ask is - what distro and which Emacs

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Friday, 16-May-2025 00:58:14 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Simon Tatham

      @ponies Nonsense. It is unrelated to GNU/Linux system, or even Unix. It is also unrelated to #GNU #Emacs. It is all about how the standard input/output/error streams buffer data.

      @simontatham

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Friday, 16-May-2025 01:12:07 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Simon Tatham

      @ponies The solution @simontatham is/was presenting, could possibly (untested) be simplified by putting { and } around all the code. It forces #GNU #bash to read the whole block (storing it in memory, so buffered reading of the file won't be an issue -- in theory) before executing it.

      In conversation about a month ago permalink
    • Embed this notice
      Ponies (ponies@mastodon.social)'s status on Friday, 16-May-2025 04:08:30 JST Ponies Ponies
      in reply to
      • Alfred M. Szmidt
      • Simon Tatham

      @amszmidt @simontatham the only nonsense here is you ignoring what I'm actually saying -- 👌😆

      In conversation about a month ago permalink
    • Embed this notice
      Alfred M. Szmidt (amszmidt@mastodon.social)'s status on Friday, 16-May-2025 13:26:01 JST Alfred M. Szmidt Alfred M. Szmidt
      in reply to
      • Simon Tatham
      • http

      @http > Speaking as someone who's been dealing with bash for a *very long time* in occasionally weird situations, I have to weigh in here: your particular use case is not common.

      And speaking as soneone who has used bash since it existed, since before bash, yeah it is bloody common. Maybe stop telling people what their experience is. It is also unrelated to bash and applies to all shells that do buffered reading, go troll soneone else.

      @ponies @simontatham

      In conversation about a month ago permalink
    • Embed this notice
      http (http@social.linux.pizza)'s status on Friday, 16-May-2025 13:26:03 JST http http
      in reply to
      • Alfred M. Szmidt
      • Simon Tatham

      @amszmidt @ponies @simontatham
      Speaking as someone who's been dealing with bash for a *very long time* in occasionally weird situations, I have to weigh in here: your particular use case is not common.
      It's *your* use case, though, and it looks to me like you could save yourself a lot of trouble by simply getting in the habit of not editing bash scripts while you run them.

      That's an interesting workaround you have come up with, though I don't know how you're planning to exit main with an error code to pass to $? without actually exiting the script.

      I'm not meaning to pry much, but what on earth are you doing that does not benefit from a restart with correct code?

      In conversation about a month ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.