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

637Draw mode doesn't restore cursor location [fix encl]

Expand Messages
  • Thomas Hundt
    May 2, 2002
    • 0 Attachment
      I've been playing with the draw mode (M-x draw), which can be quite fun and useful for little block diagrams and the like, and have discovered a few buglets:

      1. When you exit draw, it doesn't put the cursor back where it was. In fact, it seems to put it at some random place in the file. (Turns out the row and column were getting reversed.)

      2. When you enter draw mode, it can sometimes start you off at the bottom of the window, with half the drawing not visible (off the end of the window). How about centering the location in the window to start off?

      3. Help is hard to find. The normal help is disabled when in this mode, and you have to remember to use M-h (Esc h) to get it -- which I never can. So I added a couple of variations that are easier to stumble upon. (Gnu Emacs uses C-h m to display mode-specific help, so that's one of them.)

      Here are my fixes (as marked) for these problems:

      draw.emf -- line 199:

      set-variable $window-acol #l1
      recenter ; TMH FIX
      buffer-bind-create "bo" "C-h ?" .osd.draw-help osd ; TMH FIX additional variants,
      buffer-bind-create "bo" "C-h C-h" .osd.draw-help osd ; TMH FIX easier to stumble upon
      buffer-bind-create "bo" "C-h m" .osd.draw-help osd ; TMH FIX this is like Gnu help-mode
      buffer-bind-create "bo" "esc h" .osd.draw-help osd
      ml-write "[esc h - for Draw mode help]"

      draw.emf -- line 230:

      set-variable $window-acol #l1
      recenter ; TMH FIX
      buffer-bind-create "bo" "C-h ?" .osd.draw-help osd ; TMH FIX additional variants,
      buffer-bind-create "bo" "C-h C-h" .osd.draw-help osd ; TMH FIX easier to stumble upon
      buffer-bind-create "bo" "C-h m" .osd.draw-help osd ; TMH FIX this is like Gnu help-mode
      buffer-bind-create "bo" "esc h" .osd.draw-help osd
      ml-write "[esc h - for Draw mode help]"


      Future enhancements could include:
      - support for diagonal motion and drawing
      - better integration with the normal mode

      One use the numeric keypad to move in all directions -- 8 for up ('|'), 2 for down, 3 for diagonally down + right ('\'), etc.



      __________
      Thomas Hundt <thundt@...> +1-415-643-3595