When using dynamic completion, rectangle-mark-mode is broken, in so far as C-w no longer respects just killing the rectangle but instead kills the usual full (non-rectangular) region.

M-w on the other hand works, because it is the original function, while C-w is overloaded with completion-kill-region.

To test: try C-w after C-x SPC once bound to kill-region and once bound to completion-kill-region (or simply M-x the two functions with an active rectangular region).

I have "fixed" it in my init.el in the following hackish way

(add-hook 'rectangle-mark-mode-hook
      (lambda ()
        (if rectangle-mark-mode ;; entering...
            (if (not dynamic-completion-mode)
                (setq restore--dyncomplete nil)
              (setq restore--dyncomplete t)
              (dynamic-completion-mode -1))
          ;; ...else leaving
          (if restore--dyncomplete 
              (dynamic-completion-mode t)))))

What would be the right way to do it? Who to reach to have this fixed upstream? In the file it only says emacs-devel as the maintainer...

  • 1
    M-x report-emacs-bug – Stefan Sep 20 '19 at 12:19
  • What @Stefan said. What you wrote here will make a good bug report, along with the info that M-x report-emacs-bug will automatically provide (Emacs build etc.). – Drew Sep 20 '19 at 15:35
  • Done that (the bug report...). I am still trying to find out what the right fix could be but somehow I don't understand it from the code. I fear I need to learn (again) how to make use of edebug... – jtl Sep 21 '19 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.