Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.shell > #26933

Re: ed

From Nuno Silva <nunojsilva@invalid.invalid>
Newsgroups comp.unix.shell, comp.emacs
Subject Re: ed
Date 2026-07-03 07:57 +0100
Organization A noiseless patient Spider
Message-ID <1127mit$36m4d$4@dont-email.me> (permalink)
References (4 earlier) <87ldcn3jm4.fsf@jmertens.eternal-september.org> <87tsqhaqvd.fsf@lispclub.com> <11270qc$31p54$7@dont-email.me> <11273fu$32k7k$1@dont-email.me> <1127cq9$34rpg$4@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


On 2026-07-03, Lawrence D’Oliveiro wrote:

> On Fri, 3 Jul 2026 01:32:46 -0000 (UTC), John McCue wrote:
>
>> A little warning about M-q. In GNU Emacs 30+, the scratch buffer's
>> M-q is redefined to something else.
>
> I didn’t notice this (running Emacs 30.2, since that’s what was in
> Debian Unstable on my last upgrade), because I run with Emacs’ entire
> mode system disabled.
>
>> FWIW, I tend to use 'fill-paragraph' a lot in scratch.
>
> So do I.
>
> Oh, and I also added a buffer-protection mechanism, because I have a
> shortcut (super-W) for closing the current buffer, and I was losing
> the scratch buffer too often from this. ;)

After spending way too long dealing with the consequences of *scratch*
not being backed up, I went with this:

    (setq initial-buffer-choice "/home/[...]/scratch.org")

The point being that I use the initial buffer more for quick
note-keeping that ought to be transitory until saved in a more
appropriate fashion, but I kept getting bitten by bugs of the following
species - not saying it happened often enough, but still it happening
once an year or so would pose an issue:

* Drosophila Segmentationum Faltum

* Aedes Blackoutitis


Now more seriously, the point here is that, if that buffer is backed by
a file, it does get auto-saved and can be restored to at least a
somewhat recent copy in case of an improper Emacs shutdown.

If you rely on it for Elisp interaction, I suppose you could as well as
make it an Elisp file. I have the following, but I'm not sure the mode
still needs to be set after the buffer is set to open a file matching
.*\.org:

    (setq initial-major-mode 'org-mode [...] )

Now I'm not sure this matters at all with a shortcut to close the buffer
- but I suppose that, if it's a buffer with a file, it may prompt you
before killing it? (It'd otherwise not protect as much as your
protection, I guess, because there'd still be a gap between the last
auto-save and it being killed?)

(Meanwhile, I set Emacs on Android the same way, so I can start typing
notes in the buffer it opens when it starts, and just do C-x C-s,
without having to open a file first.)

-- 
Nuno Silva

Back to comp.unix.shell | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

ed __ ___ ________ ____ ______. Zayd Mohammed <zaydm@172.24.208.1> - 2026-06-08 02:16 +0000
  Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-08 04:46 +0200
    Re: ed __ ___ ________ ____ ______. cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 13:44 +0000
      Re: ed __ ___ ________ ____ ______. gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-08 14:12 +0000
        Re: ed. cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-08 19:30 +0000
      Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-08 14:40 -0700
        Re: ed __ ___ ________ ____ ______. groenveld@acm.org (John D Groenveld) - 2026-06-09 00:04 +0000
        Re: ed __ ___ ________ ____ ______. Adam Sampson <ats@offog.org> - 2026-06-09 01:50 +0100
        Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-09 16:47 +0200
          Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:41 -0700
      Re: ed __ ___ ________ ____ ______. Ben Collver <bencollver@tilde.pink> - 2026-06-09 14:27 +0000
    Re: ed __ ___ ________ ____ ______. Eric Pozharski <apple.universe@posteo.net> - 2026-06-08 22:28 +0000
    Re: ed __ ___ ________ ____ ______. Lumin Etherlight <lumin+usenet@etherlight.link> - 2026-06-09 03:25 +0300
      Re: ed __ ___ ________ ____ ______. Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-09 09:47 +0100
        Re: ed __ ___ ________ ____ ______. Joerg Mertens <joerg-mertens@t-online.de> - 2026-06-09 15:53 +0200
          Re: ed __ ___ ________ ____ ______. Daniel Cerqueira <dan.list@lispclub.com> - 2026-06-09 21:00 +0100
          Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-09 16:29 -0700
            Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 08:39 +0200
              Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-11 13:40 -0700
                Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-12 16:56 +0200
                Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-12 15:22 -0700
                Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-13 00:58 +0200
          Re: ed __ ___ ________ ____ ______. Daniel Cerqueira <dan.list@lispclub.com> - 2026-07-03 00:55 +0100
            Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-03 00:47 +0000
              Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-07-03 01:32 +0000
                Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-03 04:11 +0000
                Re: ed Nuno Silva <nunojsilva@invalid.invalid> - 2026-07-03 07:57 +0100
                Re: ed Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-07-03 09:32 +0200
            Re: ed __ ___ ________ ____ ______. Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-07-02 20:30 -0700
      Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-09 17:57 +0200
  Re: ed __ ___ ________ ____ ______. John McCue <jmclnx@gmail.com.invalid> - 2026-06-08 22:57 +0000
  Re: ed __ ___ ________ ____ ______. Lumin Etherlight <lumin+usenet@etherlight.link> - 2026-06-09 03:02 +0300
  Re: ed __ ___ ________ ____ ______. gmc@metro.cx (Koen Martens) - 2026-06-09 06:17 +0000
    Re: ed __ ___ ________ ____ ______. Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-09 06:55 +0000
    Re: ed __ ___ ________ ____ ______. John McCue <jmclnx@gmail.com.invalid> - 2026-06-09 19:44 +0000
      Re: ed __ ___ ________ ____ ______. Top Dead Ctr <tdc@invalid.invalid> - 2026-06-09 14:09 -0600
      Re: ed __ ___ ________ ____ ______. Christian Weisgerber <naddy@mips.inka.de> - 2026-06-09 23:52 +0000
        Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-10 00:40 +0000
      Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-10 00:38 +0000
        Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-10 22:01 +0000
          Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 16:43 -0700
            Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 16:50 -0700
            Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-10 23:53 +0000
              Re: ed Eli the Bearded <*@eli.users.panix.com> - 2026-06-11 00:12 +0000
                Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-11 00:55 +0000
                Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-11 02:00 +0000
                Re: ed Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-10 19:30 -0700
                Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-11 11:31 +0000
                Re: ed Christian Weisgerber <naddy@mips.inka.de> - 2026-06-11 15:02 +0000
              Re: ed Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 08:46 +0200
            Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-11 14:28 +0000
          Re: ed cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-10 23:48 +0000
          Re: ed Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-06-11 00:24 +0000
            Re: ed John McCue <jmclnx@gmail.com.invalid> - 2026-06-11 14:11 +0000
              Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-12 00:22 +0000
          Re: ed Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-11 00:53 +0000
            Re: ed Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 09:02 +0200
    Re: ed __ ___ ________ ____ ______. Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-10 11:03 +0100
      Re: ed __ ___ ________ ____ ______. Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-06-11 09:12 +0200
        Re: ed __ ___ ________ ____ ______. Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-12 09:44 +0100
          Android editor (Was: ed __ ___ ________ ____ ______.) gazelle@shell.xmission.com (Kenny McCormack) - 2026-06-12 09:03 +0000
            Re: Android editor Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-12 12:01 +0100

csiph-web