unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text
@ 2014-06-21 17:07 Drew Adams
  2014-06-21 22:01 ` Juri Linkov
  2014-07-08  8:27 ` Juri Linkov
  0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2014-06-21 17:07 UTC (permalink / raw)
  To: 17829

emacs -Q

`C-t' is `transpose-chars'. 

`M-x C-t' gives you a "Text is read-only" error, and it moves point
backward into the minibuffer prompt.  Repeating it does not move point
further backward but continues to raise the error.

Trying to type text then results in the same error message.  The user
can become confused, not realizing that point is in fact inside the
prompt area.  S?he can then use `C-f' to move back out of the prompt
area, but `C-t' should be smarter.

`transpose-chars' should presumably limit itself to field motion, or
should in some other way take such a situation into account.

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-17 on ODIEONE
Bzr revision: 117359 monnier@iro.umontreal.ca-20140617193358-2t1nl1te9gc2mqrx
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





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

* bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text
  2014-06-21 17:07 bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text Drew Adams
@ 2014-06-21 22:01 ` Juri Linkov
  2014-07-08  8:27 ` Juri Linkov
  1 sibling, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2014-06-21 22:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: 17829

> `M-x C-t' gives you a "Text is read-only" error, and it moves point
> backward into the minibuffer prompt.  Repeating it does not move point
> further backward but continues to raise the error.

I often get into the same trap when mistyping C-t instead of C-y
to yank text into the minibuffer.  This is one of possible fixes:

=== modified file 'lisp/simple.el'
--- lisp/simple.el	2014-01-31 06:42:29 +0000
+++ lisp/simple.el	2014-06-21 21:54:06 +0000
@@ -5902,7 +5902,8 @@ (defun transpose-chars (arg)
 and drag it forward past ARG other characters (backward if ARG negative).
 If no argument and at end of line, the previous two chars are exchanged."
   (interactive "*P")
-  (and (null arg) (eolp) (forward-char -1))
+  (when (and (null arg) (eolp) (not (get-text-property (1- (point)) 'read-only)))
+    (forward-char -1))
   (transpose-subr 'forward-char (prefix-numeric-value arg)))
 
 (defun transpose-words (arg)





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

* bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text
  2014-06-21 17:07 bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text Drew Adams
  2014-06-21 22:01 ` Juri Linkov
@ 2014-07-08  8:27 ` Juri Linkov
  1 sibling, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2014-07-08  8:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 17829-done

Version: 24.4.50

> `M-x C-t' gives you a "Text is read-only" error, and it moves point
> backward into the minibuffer prompt.  Repeating it does not move point
> further backward but continues to raise the error.

Fixed in the trunk since it's not a regression.





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

end of thread, other threads:[~2014-07-08  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-21 17:07 bug#17829: 24.4.50; `C-t' in empty minibuffer traps user in read-only text Drew Adams
2014-06-21 22:01 ` Juri Linkov
2014-07-08  8:27 ` Juri Linkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).