all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Recent commit modifying mark-whole-buffer (master/aeb613ea95b7970e66d663ec5cba54e9ec0528fa)
@ 2016-04-28 20:24 Kaushal Modi
  2016-04-28 21:40 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 30+ messages in thread
From: Kaushal Modi @ 2016-04-28 20:24 UTC (permalink / raw)
  To: Emacs developers, Lars Ingebrigtsen, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2458 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2016-04-30 19:18 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 20:24 Recent commit modifying mark-whole-buffer (master/aeb613ea95b7970e66d663ec5cba54e9ec0528fa) Kaushal Modi
2016-04-28 21:40 ` Lars Ingebrigtsen
2016-04-28 22:25   ` Stephan Mueller
2016-04-29  6:45     ` Eli Zaretskii
2016-04-29 12:23       ` Lars Ingebrigtsen
2016-04-29 12:41         ` Eli Zaretskii
2016-04-29 12:48           ` Lars Ingebrigtsen
2016-04-29 13:28             ` Eli Zaretskii
2016-04-29 14:28               ` Lars Ingebrigtsen
2016-04-29 17:06                 ` Eli Zaretskii
2016-04-29 17:43                   ` Kaushal Modi
2016-04-29 18:33                     ` Eli Zaretskii
2016-04-30  7:51                     ` John Wiegley
     [not found]               ` <<87y47w5w0p.fsf@gnus.org>
     [not found]                 ` <<83bn4swdif.fsf@gnu.org>
2016-04-29 19:28                   ` Drew Adams
2016-04-29 20:00                     ` Eli Zaretskii
2016-04-29 20:18                       ` Lars Ingebrigtsen
2016-04-29 20:24                         ` Eli Zaretskii
2016-04-29 20:30                           ` Lars Ingebrigtsen
2016-04-30 14:19                             ` Stefan Monnier
2016-04-30 14:34                               ` Lars Ingebrigtsen
2016-04-30 14:41                                 ` Stefan Monnier
2016-04-30 14:51                                   ` Lars Ingebrigtsen
     [not found]                       ` <<87eg9ouq24.fsf@gnus.org>
     [not found]                         ` <<83shy4ups9.fsf@gnu.org>
2016-04-29 21:48                           ` Drew Adams
2016-04-30  5:23                             ` Eli Zaretskii
     [not found]                             ` <<83r3dnvfed.fsf@gnu.org>
2016-04-30 19:06                               ` Drew Adams
     [not found]                     ` <<83y47wuqvg.fsf@gnu.org>
2016-04-29 21:49                       ` Drew Adams
2016-04-30  5:24                         ` Eli Zaretskii
     [not found]                         ` <<83pot7vfch.fsf@gnu.org>
2016-04-30 19:14                           ` Drew Adams
2016-04-30 14:15       ` Stefan Monnier
2016-04-30 19:18         ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.