Loading ...
Sorry, an error occurred while loading the content.

Re: [patch] Making `hidden' a buffer-local option

Expand Messages
  • Utz-Uwe Haus
    Hi, ... Okay. ... I very much like the idea of a separate buftype, but cannot come up with a really good name. It might be possible to implement the old idea
    Message 1 of 12 , Aug 4, 2000
    View Source
    • 0 Attachment
      Hi,

      On Fri, Aug 04, 2000 at 10:12:43PM +0200, Bram Moolenaar wrote:
      > Utz-Uwe Haus wrote:
      > > if the script relies on having hidden on in any other buffer
      > > it uses, we are in trouble.
      >
      > That's what I'm afraid of. Since the impact of a wrong assumption about
      > hidden can have bad effects (not just an error message but loosing text) I
      > don't want to risk it.
      Okay.
      > > I tried something like
      > > :au BufUnload * :call Bury(expand("<abuf>"))
      > > func! Bury(buf)
      > > exec("buffer ".a:buf)
      > > hide
      > > endfunc
      > > but the buffer was still not hidden but unloaded
      >
      > I see the problem. You want a "scratch" buffer which keeps its text when it's
      > not displayed. There already is the idea to use the 'buftype' option for
      > things like this. The value "scratch" would imply that the text is deleted
      > when the buffer is no longer displayed. What would your buffer type be
      > called?
      I very much like the idea of a separate buftype, but cannot come up with
      a really good name. It might be possible to implement the old idea
      of an in-ram-only buffer (i.e. never a swapfile, never written to a file)
      that someone wanted to have for cryptography. That would necessarily
      have the hide-if-invisible property, and I could use it for my puposes
      :>. Then 'nondisk', 'inram' or 'ramonly' would be nice names. I'll see
      what I can come up with if I find time.
      How about then adding a LosingRamBuf event, that one could trigger an
      autocommand on if the buffer is about to be lost (i.e. deleted or vim
      quits with it hidden) ?

      later
      Utz

      --
      Utz-Uwe Haus haus@...-magdeburg.de
      Inst. f. Math. Optim. utz@...
      Uni Magdeburg PGP keys 1024/6AD23BE1 and 2048/5D0B72A1
      GERMANY available via keyservers or email request
    • Wichert Akkerman
      ... tempfile? fakefile? Wichert. -- _________________________________________________________________ / Generally uninteresting signature - ignore at your
      Message 2 of 12 , Aug 4, 2000
      View Source
      • 0 Attachment
        Previously Bram Moolenaar wrote:
        > I see the problem. You want a "scratch" buffer which keeps its text when it's
        > not displayed. There already is the idea to use the 'buftype' option for
        > things like this. The value "scratch" would imply that the text is deleted
        > when the buffer is no longer displayed. What would your buffer type be
        > called?

        tempfile? fakefile?

        Wichert.

        --
        _________________________________________________________________
        / Generally uninteresting signature - ignore at your convenience \
        | wichert@... http://www.liacs.nl/~wichert/ |
        | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
      • Utz-Uwe Haus
        ... fakefile sounds nice. I ll start with that. later utz -- Utz-Uwe Haus haus@mail.math.uni-magdeburg.de Inst. f. Math. Optim.
        Message 3 of 12 , Aug 5, 2000
        View Source
        • 0 Attachment
          On Fri, Aug 04, 2000 at 11:38:16PM +0200, Wichert Akkerman wrote:
          > Previously Bram Moolenaar wrote:
          > > What would your buffer type be
          > > called?
          >
          > tempfile? fakefile?
          fakefile sounds nice. I'll start with that.

          later
          utz
          --
          Utz-Uwe Haus haus@...-magdeburg.de
          Inst. f. Math. Optim. utz@...
          Uni Magdeburg PGP keys 1024/6AD23BE1 and 2048/5D0B72A1
          GERMANY available via keyservers or email request
        Your message has been successfully submitted and would be delivered to recipients shortly.