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

Re: [patch] when 'autochdir' is set, let mksession always use full pathname independently on curdir,sesdir

Expand Messages
  • Bram Moolenaar
    ... Thanks, I ll look into it later. -- [Autumn changed into Winter ... Winter changed into Spring ... Spring changed back into Autumn and Autumn gave Winter
    Message 1 of 5 , May 2, 2009
    • 0 Attachment
      Yakov Lerner wrote:

      > When 'acd' is set, mksession uses short pathname in the typical usage which
      > leads to wrong result (the testcase below). This is biting me every time I
      > use mksession (I always have acd on).
      > The interaction of 'curdir' in sessionoptions and 'set acd' leads to
      > apparently wrong result.
      > This patch adds additional check in ses_fname, the logic is similar to the
      > check for 'did_lcd' which already exists for the same reason.
      >
      > Testcase:
      >
      > echo abc >/tmp/xxx
      > vim -u NONE -U NONE /tmp/xxx
      > :set acd
      > :he help
      > :mksession! ~/xxx
      > :qall!
      >
      > vim -u NONE -U NONE -S ~/xxx
      > ^^^ bug: upper window is empty ^^^

      Thanks, I'll look into it later.

      --
      [Autumn changed into Winter ... Winter changed into Spring ... Spring
      changed back into Autumn and Autumn gave Winter and Spring a miss and
      went straight on into Summer ... Until one day ...]
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... In my experience, :mksession interaction with local directories is, shall we say, less than perfect; and the session file is bulky, unwieldy, and largely
      Message 2 of 5 , May 2, 2009
      • 0 Attachment
        On 30/04/09 21:11, _sc_ wrote:
        >
        > On Thursday 30 April 2009 11:19 am, Yakov Lerner wrote:
        >> When 'acd' is set, mksession uses short pathname in the typical usage which
        >> leads to wrong result (the testcase below). This is biting me every time I
        >> use mksession (I always have acd on).
        >> The interaction of 'curdir' in sessionoptions and 'set acd' leads to
        >> apparently wrong result.
        >> This patch adds additional check in ses_fname, the logic is similar to the
        >> check for 'did_lcd' which already exists for the same reason.
        >
        > i have a "thorn-in-my-side" problem with netrw that's triggered
        > when 'autochdir' is on
        >
        > my workaround is to have 'noautochdir' but also
        >
        > autocmd BufEnter * lcd %:p:h
        >
        > in my vimrc -- this acts like autochdir, but does not play havoc
        > with netrw -- the places i've seen autochdir create problems so
        > far have been places involving "not real" buffers -- your help
        > window and charles' file window are both unmodifiable "unreal"
        > buffers and i can't help thinking this must be related
        >
        > i tried it here, replacing the 'set acd' with my autocmd, and the
        > session created brought both windows up just fine
        >
        > 'autochdir' is taking on the character of bad boy in my opinion,
        > and i am wondering if it would be appropriate to put the autocmd
        > alternative in the docs under
        >
        > Note: When this option is on some plugins may not work.
        >
        > or maybe it's time we examined the question of whether 'autochdir'
        > is buggy
        >
        > sc
        >

        In my experience, :mksession interaction with local directories is,
        shall we say, less than perfect; and the session file is bulky,
        unwieldy, and largely redundant with the vimrc.

        Nowadays I don't use the :mksession command anymore, but I do use
        session files, written by hand, with the minimal number of commands to
        open the windows and load the files, letting the vimrc do the bulk of
        the work. I'm attaching a session script for a rather large session, a
        script which is nowhere as big as the ones :mksession used to produce.


        Best regards,
        Tony.
        --
        If you didn't get caught, did you really do it?

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.