From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Recent commit modifying mark-whole-buffer (master/aeb613ea95b7970e66d663ec5cba54e9ec0528fa) Date: Thu, 28 Apr 2016 20:24:07 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ce3c67605f00531914fb7 X-Trace: ger.gmane.org 1461875084 26406 80.91.229.3 (28 Apr 2016 20:24:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2016 20:24:44 +0000 (UTC) To: Emacs developers , Lars Ingebrigtsen , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 28 22:24:40 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avsUI-00062Q-Ar for ged-emacs-devel@m.gmane.org; Thu, 28 Apr 2016 22:24:38 +0200 Original-Received: from localhost ([::1]:50910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avsUE-0001np-4l for ged-emacs-devel@m.gmane.org; Thu, 28 Apr 2016 16:24:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avsTy-0001kU-GP for emacs-devel@gnu.org; Thu, 28 Apr 2016 16:24:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avsTx-00062V-CK for emacs-devel@gnu.org; Thu, 28 Apr 2016 16:24:18 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:34098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avsTx-00062M-6Q for emacs-devel@gnu.org; Thu, 28 Apr 2016 16:24:17 -0400 Original-Received: by mail-oi0-x22c.google.com with SMTP id k142so96875524oib.1 for ; Thu, 28 Apr 2016 13:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=81JQz0722YLE4gbGxi8yXr2WIEGb6lX12a33oSV5S8w=; b=WvdF9yBpfWSMPGCZs6zmozVnO2w6OzNI+cdpkZcpEG4Y3B380frfSPwapeT3U/kFsE dwnOVk6is83Egbam6QoAffXlayHRS7pD46uuJnBlYsSWB5mH5kTAm3fQUKtnq36qWq0u 3jpH0alElWOVXttrW7g3KA9VdOI8o2G6mcje0C+Vwy/b67epHSM3jtIk4EIyR7zn+SuR zwd81BL/r16NZT0fHJM9KZkYiEPD31mI8VLlwzIyeucyyhelhMGf3W1SJpActwHgPAkz 0n7ebNrxMAzVQTw/oI8iixRu6nHkf3ijVkOXI4O/JZxw87g9ZoiH1nM2wA8VKIt5Sv3S OjyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=81JQz0722YLE4gbGxi8yXr2WIEGb6lX12a33oSV5S8w=; b=UoYC/dRuB7ZcxyMs2JM8BWEPDGUBiFc+1wHZ+JoE6PR1EKvQ5lHsd7h/W8JaLewDRf 2qvo7ZQTDk/zkrChGzn1+BDYTEWAvG0oNsnx8DKwD7IKqKmXP2TD9aiZXnqduuW7ofdi aKYA/Kc4TdPqFvSlOgQ9jSoWutZ62oI1g/52vPSj/2z1RF5dORCcl2zJq98PIgmiwfXV S2ul05GapKdkTNG/Cth1rmHxVi8WyOLDRVw8sFE6WWukO0yhBEjOqMYtFzZcj0bStbVP mybwTl0MrXcau/fQUvomxtcazY/37XseBzwumElOO/9hY0o9iaRS63p+rD6IMOfdNipG 8Grw== X-Gm-Message-State: AOPr4FXRffj0XB77h5sQAjA55vaZ9hp2kZfPNHqQurgSxGpascPwg+nq/LoFAIKPVOBO+ulGKQYie94tOy9wSA== X-Received: by 10.202.179.8 with SMTP id c8mr7792775oif.50.1461875056704; Thu, 28 Apr 2016 13:24:16 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:203405 Archived-At: --001a113ce3c67605f00531914fb7 Content-Type: text/plain; charset=UTF-8 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 --001a113ce3c67605f00531914fb7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

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

http://git= .savannah.gnu.org/cgit/emacs.git/commit/?id=3Daeb613ea95b7970e66d663ec5cba5= 4e9ec0528fa

I am writing because this fix for bu= g # 2589 is sort of related to bug # 21874. In the thread for the latter (= =C2=A0http= ://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21874=C2=A0), the solution w= as to set the cursor-intangible property to t in minibuffer-prompt-properti= es.

So I have the below in my config since then an= d it works great.

=3D=3D=3D=3D=3D

(let ((default (eval (car (get 'minibuffer-prompt-propert= ies 'standard-value))))
=C2=A0 =C2=A0 =C2=A0 (dont-touch-prom= pt-prop '(cursor-intangible t)))
=C2=A0 (setq minibuffer-prom= pt-properties (append default dont-touch-prompt-prop))
=C2=A0 (ad= d-hook 'minibuffer-setup-hook #'cursor-intangible-mode))

=3D=3D=3D=3D=3D

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.. mar= k between (point-min) and (point-max). So the recent modification feels a b= it "impure".

The cursor-intangible appro= ach will fix the C-x h case and also the case in bug # 21874 where the curs= or 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 t= he user has removed the cursor-intangible property from minibuffer-prompt-p= roperties.

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

Kaushal

-= -

--
Kaushal Modi

--001a113ce3c67605f00531914fb7--