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

Undead buffer: gets deleted but respawns on session launch

Expand Messages
  • Sylvia Ganush
    Good day. What may cause a deleted buffer to reappear on session launch? I once edited a file, a Figlet font. I deleted the buffer, and ... But when restart
    Message 1 of 7 , Apr 23, 2013
    • 0 Attachment
      Good day.

      What may cause a deleted buffer to reappear on session launch?

      I once edited a file, a Figlet font. I deleted the buffer, and
      then exited Vim as I usually do:

      :mksession! session.vim
      :wqa

      But when restart the session the deleted buffer is still present on the
      :ls list. The buffer itself is empty. A 'ghost', if you wish.

      What gives?

      Regards,

      Sylvia

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Ben Fritz
      ... Maybe you have the % character in your viminfo option? You said you deleted the buffer, though, so I d expect it would not be in the saved list. What
      Message 2 of 7 , Apr 23, 2013
      • 0 Attachment
        On Tuesday, April 23, 2013 10:41:08 AM UTC-5, Sylvia Ganush wrote:
        >
        > What may cause a deleted buffer to reappear on session launch?
        >

        Maybe you have the % character in your 'viminfo' option? You said you deleted the buffer, though, so I'd expect it would not be in the saved list. What command did you use to delete the buffer?

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Tony Mechelynck
        ... The :ls! list (but not the :ls list without bang) contains buffers previously edited, even if deleted. See :help :bwipeout and the last paragraph under
        Message 3 of 7 , Apr 23, 2013
        • 0 Attachment
          On 23/04/13 17:41, Sylvia Ganush wrote:
          > Good day.
          >
          > What may cause a deleted buffer to reappear on session launch?
          >
          > I once edited a file, a Figlet font. I deleted the buffer, and
          > then exited Vim as I usually do:
          >
          > :mksession! session.vim
          > :wqa
          >
          > But when restart the session the deleted buffer is still present on the
          > :ls list. The buffer itself is empty. A 'ghost', if you wish.
          >
          > What gives?
          >
          > Regards,
          >
          > Sylvia
          >

          The :ls! list (but not the :ls list without bang) contains buffers
          previously edited, even if deleted.

          See ":help :bwipeout" and the last paragraph under ":help :bdelete". See
          also ":help unlisted-buffer".


          Best regards,
          Tony.
          --
          According to the obituary notices, a mean and unimportant person never
          dies.

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Sylvia Ganush
          ... Hi Ben. Here s my viminfo option: viminfo= 100,
          Message 4 of 7 , Apr 24, 2013
          • 0 Attachment
            On 23 Apr 2013, at 19:06, Ben Fritz <fritzophrenic@...> wrote:

            > On Tuesday, April 23, 2013 10:41:08 AM UTC-5, Sylvia Ganush wrote:
            >>
            >> What may cause a deleted buffer to reappear on session launch?
            >>
            >
            > Maybe you have the % character in your 'viminfo' option? You said you deleted the buffer, though, so I'd expect it would not be in the saved list. What command did you use to delete the buffer?

            Hi Ben.

            Here's my 'viminfo' option:

            viminfo='100,<50,s10,h,rA:,rB:

            No '%' in there. The ghost buffer always has '#h' in front of its name.

            To delete the buffer I do:

            :bd!

            Sylvia

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ben Fritz
            ... 7. Reloads the buffer list, with the last cursor positions. If sessionoptions contains buffers then all buffers are restored, including hidden and
            Message 5 of 7 , Apr 24, 2013
            • 0 Attachment
              On Tuesday, April 23, 2013 10:41:08 AM UTC-5, Sylvia Ganush wrote:
              > Good day.
              >
              >
              >
              > What may cause a deleted buffer to reappear on session launch?
              >
              >
              >
              > I once edited a file, a Figlet font. I deleted the buffer, and
              >
              > then exited Vim as I usually do:
              >
              >
              >
              > :mksession! session.vim
              >
              > :wqa
              >
              >
              >
              > But when restart the session the deleted buffer is still present on the
              >
              > :ls list. The buffer itself is empty. A 'ghost', if you wish.
              >
              >
              >
              > What gives?
              >

              :help :mksession says:

              7. Reloads the buffer list, with the last cursor positions. If
              'sessionoptions' contains "buffers" then all buffers are restored,
              including hidden and unloaded buffers. Otherwise only buffers in windows
              are restored.

              So, after reading Tony's response, I expect you could solve this either by removing 'buffers' from your sessionoptions, or by using :bwipe instead of :bd to delete the buffer.

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Tony Mechelynck
              ... #h means a hidden buffer, which is the alternate buffer (i.e. usually the last buffer you edited before the current one). Try :bw! instead of :bd! and see
              Message 6 of 7 , Apr 24, 2013
              • 0 Attachment
                On 24/04/13 20:56, Sylvia Ganush wrote:
                >
                > On 23 Apr 2013, at 19:06, Ben Fritz <fritzophrenic@...> wrote:
                >
                >> On Tuesday, April 23, 2013 10:41:08 AM UTC-5, Sylvia Ganush wrote:
                >>>
                >>> What may cause a deleted buffer to reappear on session launch?
                >>>
                >>
                >> Maybe you have the % character in your 'viminfo' option? You said you deleted the buffer, though, so I'd expect it would not be in the saved list. What command did you use to delete the buffer?
                >
                > Hi Ben.
                >
                > Here's my 'viminfo' option:
                >
                > viminfo='100,<50,s10,h,rA:,rB:
                >
                > No '%' in there. The ghost buffer always has '#h' in front of its name.
                >
                > To delete the buffer I do:
                >
                > :bd!
                >
                > Sylvia
                >

                #h means a hidden buffer, which is the alternate buffer (i.e. usually
                the last buffer you edited before the current one).

                Try :bw! instead of :bd! and see if there is a difference. But beware!
                :bw forgets *everything* that Vim has in memory concerning that buffer.


                Best regards,
                Tony.
                --
                FIGHTING WORDS

                Say my love is easy had,
                Say I'm bitten raw with pride,
                Say I am too often sad --
                Still behold me at your side.

                Say I'm neither brave nor young,
                Say I woo and coddle care,
                Say the devil touched my tongue --
                Still you have my heart to wear.

                But say my verses do not scan,
                And I get me another man!
                -- Dorothy Parker

                --
                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Sylvia Ganush
                ... Thank you Ben, thank you Tony. I gave up and simply recreated the session. The offending buffer just wouldn t die no matter what. :bw! didn t get it, nor
                Message 7 of 7 , Apr 25, 2013
                • 0 Attachment
                  On 25 Apr 2013, at 00:06, Ben Fritz <fritzophrenic@...> wrote:

                  > So, after reading Tony's response, I expect you could solve this either by removing 'buffers' from your sessionoptions, or by using :bwipe instead of :bd to delete the buffer.

                  Thank you Ben, thank you Tony.

                  I gave up and simply recreated the session.

                  The offending buffer just wouldn't die no matter what. ':bw!' didn't get it,
                  nor did ':set sessionoptions-=buffers'.

                  Maybe I was doing something wrong, but I open dozens of other files and delete
                  the respective buffers, but only this one stuck inside the session for some
                  reason. The stars must have aligned in a certain way at its birth. ;-)

                  Sylvia

                  --
                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                Your message has been successfully submitted and would be delivered to recipients shortly.