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

Re: [PATCH] Re: unnamedplus issue

Expand Messages
  • Dimitar DIMITROV
    ... Ok, thanks, that is much clearer now. What about the unexpected behaviour I described, can you reproduce it? -- -- You received this message from the
    Message 1 of 7 , Feb 11, 2013
    • 0 Attachment
      > On 11-Feb-13 14:55:48 +0100, Dimitar DIMITROV wrote:
      >
      > > [7 lines deleted]
      > >
      > > Also, I can't make sense of the help for 'unnamedplus.
      > > It reads that all operations except yank go to "+, then first thing it says
      > > after is yank copies to "+.
      > > Can someone explain?
      >
      > Yes, I also found this confusing when I once looked into this new option flag
      > (see
      > http://groups.google.com/group/vim_dev/browse_thread/thread/431ea378c423958/916a2f948b117a6a
      > for the discussion around v:register, and my conclusion at the end).
      >
      > Here's a proposed doc update, based on my understanding and experiments; I think
      > this is way clearer than the original text:
      >
      >
      > #v+
      > diff -r ba8835947b8b
      runtime/doc/options.txt
      > --- a/runtime/doc/options.txt    Wed Feb 06 19:58:43 2013 +0100
      > +++ b/runtime/doc/options.txt    Mon Feb 11 17:07:25 2013 +0100
      > @@ -1463,11 +1463,13 @@
      >             |gui-clipboard|.
      >
      >                         *clipboard-unnamedplus*
      > -    unnamedplus    A variant of "unnamed" flag which uses the clipboard
      > -            register '+' (|quoteplus|) instead of register '*' for
      > -            all operations except yank.  Yank shall copy the text
      > -           
      into register '+' and also into '*' when "unnamed" is
      > -            included.
      > +    unnamedplus    A variant of the "unnamed" flag which uses the
      > +            clipboard register '+' (|quoteplus|; instead of '*')
      > +            for all yank, delete, change and put operations which
      > +            would normally go to the unnamed register.  When
      > +            "unnamed" is also added to the option, yank operations
      > +            (but not delete, change or put) will additionally copy
      >
      +            the text into register '*'.
      >             Only available with the |+X11| feature.
      >             Availability can be checked with: >
      >                 if has('unnamedplus')
      > #v-
      >
      > -- regards, ingo

      Ok, thanks, that is much clearer now.
      What about the unexpected behaviour I described, can you reproduce it?

      --
      --
      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Dimitar DIMITROV
      Hi Ingo, You did explain the help for unnamedplus but there is still the problem I described: 1. gvim -NX -u NONE -c se cb^=unnamedplus 2. iLorem ipsum
      Message 2 of 7 , Feb 12, 2013
      • 0 Attachment

        Hi Ingo,

        You did explain the help for '
        unnamedplus but there is still the problem I described:

        1. gvim -NX -u NONE -c 'se cb^=unnamedplus'
        2. iLorem ipsum dolor<esc>
        3. yvbgevbp => E353: Nothing in register +

        I would have expected a result of: Lorem dolor dolor

        Can you reproduce it?

        Cheers
         
        Dimitar

        Vim version:

        VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov 17 2012 15:42:46)
        Included patches: 1-409
        Modified by Gentoo-7.3.409
        Compiled by root@winterfell
        Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
        +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv -cscope
        +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext
        -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec
        +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme -netbeans_intg +path_extra -perl +persistent_undo +postscript +printer
        +profile +python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
        -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
        +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
           system vimrc file: "/etc/vim/vimrc"
             user vimrc file: "$HOME/.vimrc"
              user exrc file: "$HOME/.exrc"
          system gvimrc file: "/etc/vim/gvimrc"
            user gvimrc file: "$HOME/.gvimrc"
            system menu file: "$VIMRUNTIME/menu.vim"
          fall-back for $VIM: "/usr/share/vim"
        Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
        -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/
        include/libdrm   -DORBIT2=1 -pthread -D_REENTRANT -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -
        I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/i
        nclude/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/u
        sr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm
           -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
        Linking: x86_64-pc-linux-gnu-gcc   -Wl,-O1 -Wl,--as-needed -L/usr/local/lib -Wl,--as-needed -o gvim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_p
        ixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-acti
        vation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthrea
        d-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lelf   -lcurses -lacl -lattr -lgpm -ldl     -L/usr/lib/python2.7/config -lpython2.7 -
        lpthread -ldl -lutil -lm -Xlinker -export-dynamic

        ---
        GPG Key: 2048R/160C6FA8 2012-10-11 Dimitar Dimitrov (kurkale6ka) <mitkofr@...>

        --
        --
        You received this message from the "vim_dev" 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_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
         
         
      • Ben Fritz
        ... I use Windows gvim, where the -X flag does nothing according to the help, so I started with: gvim -N -u NONE -i NONE ... Without clipboard equal to
        Message 3 of 7 , Feb 12, 2013
        • 0 Attachment
          On Tuesday, February 12, 2013 8:38:02 AM UTC-6, Dimitar DIMITROV wrote:
          > Hi Ingo,
          >
          > You did explain the help for 'unnamedplus but there is still the problem I described:
          >
          >
          >
          > 1. gvim -NX -u NONE -c 'se cb^=unnamedplus'

          I use Windows gvim, where the -X flag does nothing according to the help, so I started with:

          gvim -N -u NONE -i NONE

          > 2. iLorem ipsum dolor<esc>
          > 3. yvbgevbp => E353: Nothing in register +
          >
          >
          > I would have expected a result of: Lorem dolor dolor
          >

          Without clipboard equal to "unnamedplus" I get the expected result.

          With clipboard equal to either "unnamedplus" or "unnamed" I do not get any error message. However, I also see no changes to the text.

          The reason the text does not change is that the deleted text is placed into the '+' register before pasting from this register. I thought this was fixed in a patch recently but I don't see any such patch in ftp://ftp.vim.org/pub/vim/patches/7.3/README. Maybe I just remember a thread without a patch?

          I don't know why you're getting the "nothing in register" error. Maybe because you're using the -X startup flag, which explicitly tells Vim NOT to connect to X?

          --
          --
          You received this message from the "vim_dev" 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_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Dimitar DIMITROV
          ... Thanks Ben, all my bad, you are right, when not using -X it works according to the docs. Not sure why you are having the issue you describe. Thanks for
          Message 4 of 7 , Feb 12, 2013
          • 0 Attachment
            > On Tuesday, February 12, 2013 8:38:02 AM UTC-6, Dimitar DIMITROV wrote:
            > > Hi Ingo,
            > >
            > > You did explain the help for 'unnamedplus but there is still the problem I described:
            > >
            > >
            > >
            > > 1. gvim -NX -u NONE -c 'se cb^=unnamedplus'
            >
            > I use Windows gvim, where the -X flag does nothing according to the help, so I started with:
            >
            > gvim -N -u NONE -i NONE
            >
            > > 2. iLorem ipsum dolor<esc>
            > > 3. yvbgevbp => E353: Nothing in register +
            > >
            > >
            > > I would have expected a result of: Lorem dolor dolor
            > >
            >
            > Without clipboard equal to "unnamedplus" I get the expected result.
            >
            > With clipboard equal to either "unnamedplus" or "unnamed" I do
            not get any error message. However, I also see no changes to the text.
            >
            > The reason the text does not change is that the deleted text is placed into the '+' register before pasting from this register. I thought this was fixed in a patch recently but I don't see any such patch in ftp://ftp.vim.org/pub/vim/patches/7.3/README. Maybe I just remember a thread without a patch?
            >
            > I don't know why you're getting the "nothing in register" error. Maybe because you're using the -X startup flag, which explicitly tells Vim NOT to connect to X?

            Thanks Ben,

            all my bad, you are right, when not using -X it works according to the docs.
            Not sure why you are having the issue you describe.
            Thanks for your help and apologies to the list.

            --
            --
            You received this message from the "vim_dev" 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_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
             
             
          • Christian Brabandt
            Hi Dimitar! ... Seems to work for me with the latest patch level (with either vim or gvim). I am not sure, why you are using -X here. This might be your issue.
            Message 5 of 7 , Feb 12, 2013
            • 0 Attachment
              Hi Dimitar!

              On Mo, 11 Feb 2013, Dimitar DIMITROV wrote:

              > Hi,
              >
              > 1. gvim -NX -u NONE -c 'se cb^=unnamedplus'
              > 2. iLorem ipsum dolor<esc>
              > 3. yvbgevbp => E353: Nothing in register +
              >
              > I would have expected a result of: Lorem dolor dolor

              Seems to work for me with the latest patch level (with either vim or
              gvim). I am not sure, why you are using -X here. This might be your
              issue. Please check with the latest mercurial patchlevel.


              Mit freundlichen Grüßen
              Christian
              --
              Kommt der Gockel unter'n Trecker, gibt es morgens keinen Wecker.

              --
              --
              You received this message from the "vim_dev" 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_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.