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

Re: Undead buffer: gets deleted but respawns on session launch

Expand Messages
  • 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 1 of 9 , Apr 24, 2013
      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 2 of 9 , Apr 25, 2013
        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.
      • Victoria Stuart
        ... http://stackoverflow.com/questions/5238251/deleting-buffer-from-vim-session/41683144#41683144 Ok: this was annoying me, too. I have a command (Arch Linux:
        Message 3 of 9 , Jan 16
          On Tuesday, April 23, 2013 at 8:41:08 AM UTC-7, 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

          http://stackoverflow.com/questions/5238251/deleting-buffer-from-vim-session/41683144#41683144



          Ok: this was annoying me, too. I have a command (Arch Linux: Krusader file manager)

          vim --remote

          that enables me to right-click a file in Krusader and open that fike in Vim. I also save Vim sessions via my ~/.vimrc:

          " Save session on quitting Vim:
          autocmd! VimLeave * mksession! ~/.vim/vim_session.vim
          " mksession! overwrites old session

          " Restore session on starting Vim:
          autocmd! VimEnter * source ~/.vim/vim_session.vim

          However, a file I opened externally via vim --remote, e.g.

          /mnt/Vancouver/Programming/scripts/chunk.sh

          stubbornly persists between sessions, even after doing the usual :bd, :bw, :bw! etc. commands, and/or deleting the vim session file.

          Looking at the vim_session.vim file, I noted an 'argadd' line with the offending, persistent file:

          argadd /mnt/Vancouver/Programming/scripts/chunk.sh

          So,

          :help arglist

          :argd /mnt/Vancouver/Programming/scripts/chunk.sh
          " delete that arg

          Finally, clear that file from the buffer list (:bd). Restart Vim: the previous session is restored, minus that file.

          --
          --
          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/d/optout.
        • Felipe Vieira
          I have reported the same problem: https://groups.google.com/forum/#!topic/vim_use/qL4--7akXS4 Looks like you are not the only one. Since we found a workaround
          Message 4 of 9 , Jan 18
            I have reported the same problem:

            https://groups.google.com/forum/#!topic/vim_use/qL4--7akXS4

            Looks like you are not the only one.

            Since we found a workaround but the behavior seems to be wrong I have opened a github issue:

            https://github.com/vim/vim/issues/1393

            --
            --
            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/d/optout.
          Your message has been successfully submitted and would be delivered to recipients shortly.