emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recent commit modifying mark-whole-buffer (master/aeb613ea95b7970e66d663


From: Kaushal Modi
Subject: Recent commit modifying mark-whole-buffer (master/aeb613ea95b7970e66d663ec5cba54e9ec0528fa)
Date: Thu, 28 Apr 2016 20:24:07 +0000

Hi all,

The following recent commit in master branch slightly changes the behavior of C-x h or mark-whole-buffer.

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=aeb613ea95b7970e66d663ec5cba54e9ec0528fa

I am writing because this fix for bug # 2589 is sort of related to bug # 21874. In the thread for the latter ( http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21874 ), the solution was to set the cursor-intangible property to t in minibuffer-prompt-properties.

So I have the below in my config since then and it works great.

=====

(let ((default (eval (car (get 'minibuffer-prompt-properties 'standard-value))))
      (dont-touch-prompt-prop '(cursor-intangible t)))
  (setq minibuffer-prompt-properties (append default dont-touch-prompt-prop))
  (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode))

=====

My suggestion would be to add '(cursor-intangible t) by default to minibuffer-prompt-properties so that we don't need to modify individual simple functions like mark-whole-buffer. Originally the function did as the name says.. mark between (point-min) and (point-max). So the recent modification feels a bit "impure".

The cursor-intangible approach will fix the C-x h case and also the case in bug # 21874 where the cursor enters the minibuffer prompt when using arrow keys.

If a user desires to in fact select the whole minibuffer including the prompt, the original mark-whole-buffer (before this commit) will work if the user has removed the cursor-intangible property from minibuffer-prompt-properties.

Question:
- Should we revert mark-whole-buffer to its definition before this commit and mark-whole-buffer and make the cursor intangible by default in minibuffer prompt?

Kaushal

--

--
Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]