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

2623Re: [jasspa] Re: Overwrite Selection

Expand Messages
  • Steven Phillips
    Dec 8, 2010
    Jeremy,

    Can you please try out the following patch, below is a diff and attached is the complete emf file, I suggest you keep your current version just in case there is a problem. I may have missed an input key or two, please let me know if I have.

    Also while doing this I noticed a fundamental difference between ME's shift region and the standard - if you shift a region and then move (i.e. let go of the shift and then press a cursor key) ME's shift region implementation still copies the region to the kill buffer whereas on windows you must use C-c to copy it into the cut/paste buffer. I guess I was thinking nore of Unix style mouse behaviour when I implemented this rather than a true MS region interface. Should this be changed or does this quirk suit ME?

    Steve

    *** msshift.emf    29 Aug 2009 17:47:39 -0000    2.12
    --- msshift.emf    8 Dec 2010 10:58:55 -0000
    ***************
    *** 27,39 ****
          !endif
          ; restore the input function so this only gets called once!
          set-variable $buffer-input .msshift.input
    !     ; only treat delete and backspace specially
    !     !if &lfi "|backward-delete-char|forward-delete-char|kill-region|" @cc
              set-variable .status "1"
              -1 yank
    !         kill-region
              !return
    !     !elif &lfi "|kill-rectangle|" @cc
              set-variable .status "1"
              -1 yank
              execute-named-command @cc
    --- 27,38 ----
        !endif
        ; restore the input function so this only gets called once!
        set-variable $buffer-input .msshift.input
    !   !if &lfi "|backward-delete-char|forward-delete-char|" @cc
          set-variable .status "1"
          -1 yank
    !     -1 kill-region
          !return
    !   !elif &lfi "|kill-region|kill-rectangle|" @cc
          set-variable .status "1"
          -1 yank
          execute-named-command @cc
    ***************
    *** 41,52 ****
          !elif &seq "copy-region" @cc
              set-variable .status "1"
              !return
    !     !elif &seq "yank" @cc
    !         set-variable .status "1"
              -1 yank
              -1 kill-region
    -         yank
    -         !return
          !elif &seq "mouse-event" @cc
              set-variable .mouse-event.msshift 3
          !elif &set #l0 &sin "mouse-pick-" @cck
    --- 40,51 ----
        !elif &seq "copy-region" @cc
          set-variable .status "1"
          !return
    !   !elif &lfi "|yank|newline|" @cc
    !     -1 yank
    !     -1 kill-region
    !   !elif &seq @cck @cc
          -1 yank
          -1 kill-region
        !elif &seq "mouse-event" @cc
          set-variable .mouse-event.msshift 3
        !elif &set #l0 &sin "mouse-pick-" @cck


    Jeremy Cowgar wrote:
     

    Yes, just MS shift region.

     

    Jeremy

     

    From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf Of Steven Phillips
    Sent: Tuesday, November 02, 2010 5:25 AM
    To: jasspa@yahoogroups.com
    Subject: Re: [jasspa] Re: Overwrite Selection

     

     

    Is this to work with just the 'MS Shift Region' feature (i.e. holding down the shift key to define the require selection to be overwritten)? with the mouse? with a region defined by set-mark (esc space)?  or a combination of all three?

    The MS shift region may be possible without a huge impact, likewise the mouse if MS Shift was enabled, but trying to implement this with support for a general set-mark could be awkward to say the least.

    Steve

    cp200205 wrote:

     

    I guess I am back to this same wish. If text is selected and I type, can the selected text be automatically deleted?

    Jeremy

    --- In jasspa@yahoogroups.com, Thomas Hundt <thundt@...> wrote:
    >
    > Yes, I know what you mean. Windows apps get you used to doing stuff
    > like that. Hitting ^W is not possible? (I think you can do it even
    > after you've typed something and noticed that your selection has become
    > un-highlighted and has started being pushed to the right by your new
    > text. Just because an area is no longer highlighted does not mean it is
    > not still selected.)
    >
    > If you really do want this, I guess the question for MicroEmacs is, how
    > is it supposed to know when to do this auto-killing behavior. Whenever
    > something is selected, and the selection is highlighted, and you hit a
    > self-insert key (i.e., not a navigational or command one)? It could be
    > called "windows notepad mode".
    >
    > -Th
    >
    >
    >
    > Jeremy Cowgar wrote:
    > > Is it possible to configure MicroEmacs to overwrite what is currently
    > > selected? I have gotten into the habbit of doing things like Shift-Home,
    > > Hello, World! By default, MicroEmacs un-selects the text and where ever the
    > > cursor is, starts entering the text I enter.
    > >
    > > I would like it to remove the text on first key stroke. Is that possible?
    > >
    > > Jeremy
    >

  • Show all 8 messages in this topic