unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* confusing info in C-u C-x =
@ 2005-11-20  9:55 Werner LEMBERG
  2005-11-20 15:16 ` Andreas Schwab
  2005-11-20 23:21 ` Richard M. Stallman
  0 siblings, 2 replies; 17+ messages in thread
From: Werner LEMBERG @ 2005-11-20  9:55 UTC (permalink / raw)



Pressing C-u C-x = on an underlined space character in mew shows this:

    character: SPC (040, 32, 0x20, U+0020)
    ...

  There is an overlay here:
   From 14 to 15
    face                 [underline]
    mew                  t

  ...

What does the `From 14 to 15' mean?


    Werner

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

* Re: confusing info in C-u C-x =
  2005-11-20  9:55 confusing info in C-u C-x = Werner LEMBERG
@ 2005-11-20 15:16 ` Andreas Schwab
  2005-11-20 22:07   ` [SPAM?]: " Werner LEMBERG
                     ` (2 more replies)
  2005-11-20 23:21 ` Richard M. Stallman
  1 sibling, 3 replies; 17+ messages in thread
From: Andreas Schwab @ 2005-11-20 15:16 UTC (permalink / raw)
  Cc: emacs-devel

Werner LEMBERG <wl@gnu.org> writes:

> Pressing C-u C-x = on an underlined space character in mew shows this:
>
>     character: SPC (040, 32, 0x20, U+0020)
>     ...
>
>   There is an overlay here:
>    From 14 to 15
>     face                 [underline]
>     mew                  t
>
>   ...
>
> What does the `From 14 to 15' mean?

It is supposed to be the overlay start and end, but uses the overlay that
has been put at the character in the help buffer instead of the original
overlay.  This was apparently a deliberate choice so that you can do C-u
C-x = on a character in the *Help* buffer and still get information on the
text properties and overlays:

2004-05-05  Kenichi Handa  <handa@m17n.org>

	* descr-text.el (describe-char): Copy the character with text
	properties and overlays into the first line, and call
	describe-text-properties on it.

Unfortunately that has the side effect of losing the original overlay
position.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: confusing info in C-u C-x =
@ 2005-11-20 19:35 martin rudalics
  0 siblings, 0 replies; 17+ messages in thread
From: martin rudalics @ 2005-11-20 19:35 UTC (permalink / raw)
  Cc: emacs-devel

> What does the `From 14 to 15' mean?

14 denotes the position of the character you want to describe as
replicated in the *Help* buffer, in your case the position of the `S' in
SPC.  When the character you want to describe is covered by an overlay,
`describe-char' always creates a dummy overlay of length 1 at that
position and gives it the properties of the overlay covering the
character you want to describe.  In your case there must have been at
least one overlay covering the space.  Any overlay properties there
should have been replicated correctly.  The `From 14 to 15', however,
refers to the dummy overlay in the *Help* buffer and should be, in my
opinion, omitted.

Obtaining the start/end positions of all overlays covering the character
you want to describe would require a revision of the concept sketched
above.

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

* Re: [SPAM?]: Re: confusing info in C-u C-x =
  2005-11-20 15:16 ` Andreas Schwab
@ 2005-11-20 22:07   ` Werner LEMBERG
  2005-11-21  7:35   ` Juri Linkov
  2005-12-08  1:49   ` Kenichi Handa
  2 siblings, 0 replies; 17+ messages in thread
From: Werner LEMBERG @ 2005-11-20 22:07 UTC (permalink / raw)
  Cc: emacs-devel

> > What does the `From 14 to 15' mean?
> 
> It is supposed to be the overlay start and end, but uses the overlay
> that has been put at the character in the help buffer instead of the
> original overlay.  This was apparently a deliberate choice so that
> you can do C-u C-x = on a character in the *Help* buffer and still
> get information on the text properties and overlays:

For me (and probably many others) this information is completely
useless.  Either it should become more meaningful or it should be
removed.


    Werner

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

* Re: confusing info in C-u C-x =
  2005-11-20  9:55 confusing info in C-u C-x = Werner LEMBERG
  2005-11-20 15:16 ` Andreas Schwab
@ 2005-11-20 23:21 ` Richard M. Stallman
  1 sibling, 0 replies; 17+ messages in thread
From: Richard M. Stallman @ 2005-11-20 23:21 UTC (permalink / raw)
  Cc: emacs-devel

      There is an overlay here:
       From 14 to 15

Perhaps we should make that "From buffer position 14 to 15".

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

* Re: confusing info in C-u C-x =
  2005-11-20 15:16 ` Andreas Schwab
  2005-11-20 22:07   ` [SPAM?]: " Werner LEMBERG
@ 2005-11-21  7:35   ` Juri Linkov
  2005-12-08  1:49   ` Kenichi Handa
  2 siblings, 0 replies; 17+ messages in thread
From: Juri Linkov @ 2005-11-21  7:35 UTC (permalink / raw)
  Cc: emacs-devel

> Unfortunately that has the side effect of losing the original overlay
> position.

C-u C-x = also displays wrong information when invoked on buttons.
For instance, in the Help buffer created by describe-function or
describe-variable, C-u C-x = typed on the button leading to the source
file doesn't display correct button name.  It displays only one
character that was under point on the button, but not the whole button.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: confusing info in C-u C-x =
@ 2005-11-21  8:56 martin rudalics
  0 siblings, 0 replies; 17+ messages in thread
From: martin rudalics @ 2005-11-21  8:56 UTC (permalink / raw)
  Cc: emacs-devel

You could try the following patch:

*** descr-text.el	Sat Nov  5 20:44:24 2005
--- descr-text.el	Mon Nov 21 08:50:36 2005
***************
*** 144,160 ****
         (goto-char (point-min)))))

   ;;;###autoload
! (defun describe-text-properties (pos &optional output-buffer)
     "Describe widgets, buttons, overlays and text properties at POS.
   Interactively, describe them for the character after point.
   If optional second argument OUTPUT-BUFFER is non-nil,
   insert the output into that buffer, and don't initialize or clear it
! otherwise."
     (interactive "d")
     (if (>= pos (point-max))
         (error "No character follows specified position"))
     (if output-buffer
!       (describe-text-properties-1 pos output-buffer)
       (if (not (or (text-properties-at pos) (overlays-at pos)))
   	(message "This is plain text.")
         (let ((buffer (current-buffer))
--- 144,162 ----
         (goto-char (point-min)))))

   ;;;###autoload
! (defun describe-text-properties (pos &optional output-buffer overlay-bounds)
     "Describe widgets, buttons, overlays and text properties at POS.
   Interactively, describe them for the character after point.
   If optional second argument OUTPUT-BUFFER is non-nil,
   insert the output into that buffer, and don't initialize or clear it
! otherwise.
! Optional third argument OVERLAY-BOUNDS is a list of start and end
! positions of overlays as produced by `describe-char'."
     (interactive "d")
     (if (>= pos (point-max))
         (error "No character follows specified position"))
     (if output-buffer
!       (describe-text-properties-1 pos output-buffer overlay-bounds)
       (if (not (or (text-properties-at pos) (overlays-at pos)))
   	(message "This is plain text.")
         (let ((buffer (current-buffer))
***************
*** 171,177 ****
   	    (describe-text-mode)
   	    (goto-char (point-min))))))))

! (defun describe-text-properties-1 (pos output-buffer)
     (let* ((properties (text-properties-at pos))
   	 (overlays (overlays-at pos))
   	 (wid-field (get-char-property pos 'field))
--- 173,179 ----
   	    (describe-text-mode)
   	    (goto-char (point-min))))))))

! (defun describe-text-properties-1 (pos output-buffer &optional overlay-bounds)
     (let* ((properties (text-properties-at pos))
   	 (overlays (overlays-at pos))
   	 (wid-field (get-char-property pos 'field))
***************
*** 205,212 ****
   	  (widget-insert "There are " (format "%d" (length overlays))
   			 " overlays here:\n"))
   	(dolist (overlay overlays)
! 	  (widget-insert " From " (format "%d" (overlay-start overlay))
! 			 " to " (format "%d" (overlay-end overlay)) "\n")
   	  (describe-property-list (overlay-properties overlay)))
   	(widget-insert "\n"))
         ;; Text properties
--- 207,222 ----
   	  (widget-insert "There are " (format "%d" (length overlays))
   			 " overlays here:\n"))
   	(dolist (overlay overlays)
!           (if overlay-bounds
!               (progn
!                 ;; OVERLAY-BOUNDS must be a list of the bounds of all overlays
!                 ;; at some "original" position.  The overlays at POS are one
!                 ;; character wide replicas of the overlays at that position.
!                 (widget-insert " From " (format "%d" (caar overlay-bounds))
!                                " to " (format "%d" (cdar overlay-bounds)) "\n")
!                 (setq overlay-bounds (cdr overlay-bounds)))
!             (widget-insert " From " (format "%d" (overlay-start overlay))
!                            " to " (format "%d" (overlay-end overlay)) "\n"))
   	  (describe-property-list (overlay-properties overlay)))
   	(widget-insert "\n"))
         ;; Text properties
***************
*** 458,463 ****
--- 468,476 ----
   	 (multibyte-p enable-multibyte-characters)
   	 (overlays (mapcar #'(lambda (o) (overlay-properties o))
   			   (overlays-at pos)))
+          (overlay-bounds ; Make list of start and end positions of overlays
+           (mapcar #'(lambda (o) (cons (overlay-start o) (overlay-end o)))
+                       (nreverse (overlays-at pos))))
   	 item-list max-width unicode)

       (if (or (< char 256)
***************
*** 718,724 ****
   	  (insert "\nSee the variable `reference-point-alist' for "
   		  "the meaning of the rule.\n"))

! 	(describe-text-properties pos (current-buffer))
   	(describe-text-mode)))))

   (defalias 'describe-char-after 'describe-char)
--- 731,737 ----
   	  (insert "\nSee the variable `reference-point-alist' for "
   		  "the meaning of the rule.\n"))

! 	(describe-text-properties pos (current-buffer) overlay-bounds)
   	(describe-text-mode)))))

   (defalias 'describe-char-after 'describe-char)

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

* Re: confusing info in C-u C-x =
  2005-11-20 15:16 ` Andreas Schwab
  2005-11-20 22:07   ` [SPAM?]: " Werner LEMBERG
  2005-11-21  7:35   ` Juri Linkov
@ 2005-12-08  1:49   ` Kenichi Handa
  2005-12-09  9:57     ` Juri Linkov
  2 siblings, 1 reply; 17+ messages in thread
From: Kenichi Handa @ 2005-12-08  1:49 UTC (permalink / raw)
  Cc: emacs-devel

In article <je1x1b4aex.fsf@sykes.suse.de>, Andreas Schwab <schwab@suse.de> writes:
[...]
>>    There is an overlay here:
>>     From 14 to 15
[...]
>>  What does the `From 14 to 15' mean?

> It is supposed to be the overlay start and end, but uses the overlay that
> has been put at the character in the help buffer instead of the original
> overlay.  This was apparently a deliberate choice so that you can do C-u
> C-x = on a character in the *Help* buffer and still get information on the
> text properties and overlays:

> 2004-05-05  Kenichi Handa  <handa@m17n.org>

> 	* descr-text.el (describe-char): Copy the character with text
> 	properties and overlays into the first line, and call
> 	describe-text-properties on it.

> Unfortunately that has the side effect of losing the original overlay
> position.

I've just installed two changes to fix it.

(1) Use *Help-2* buffer if the current buffer is *Help*.
The function describe-text-properties already does it.

(2) Don't change the value of arg POS in describe-char, and
call describe-text-properties while temporarily setting the
original buffer.

martin rudalics <rudalics@gmx.at> writes:

> You could try the following patch:
[...]
>    ;;;###autoload
> ! (defun describe-text-properties (pos &optional output-buffer overlay-bounds)
[...]

I think that adding the arg OVERLAY-BOUNDS is too adhoc.  To
make this function more convenient, isn't it better to add
arg OBJECT (buffer of string POS is pointing to) just like
the other text property related functions ... after the
release?

---
Kenichi Handa
handa@m17n.org

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

* Re: confusing info in C-u C-x =
  2005-12-08  1:49   ` Kenichi Handa
@ 2005-12-09  9:57     ` Juri Linkov
  2005-12-09 15:07       ` Kim F. Storm
                         ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Juri Linkov @ 2005-12-09  9:57 UTC (permalink / raw)
  Cc: schwab, emacs-devel

> I've just installed two changes to fix it.
>
> (1) Use *Help-2* buffer if the current buffer is *Help*.
> The function describe-text-properties already does it.

*Help-2* is not handled correctly when same-window-regexps
contains the standard regexp to handle buffers with similar names:
"\\*Help\\*\\(\\|<[0-9]+>\\)".

I propose using (generate-new-buffer-name "*Help*") in both functions
to generate the standard unique names like *Help*<2>.

Also the *Help* buffer created by `describe-char' misses "[back]"
button.  It is too bad because it loses the stack of visited
Help items.  The patch below adds "[back]" button without putting
the `describe-char' item to the help stack, because there is no
reliable way to recreate the Help buffer for `describe-char'.
Its argument is `pos', but this position and buffer may not exist
when the Help buffer for `describe-char' is recreated later after
returning from its next Help item's buffer.

There is one problem with having "[back]" button in describe-text-mode.
TAB can't navigate to it.  But this is minor disadvantage because
RET still works on it.

Index: lisp/descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.43
diff -c -r1.43 descr-text.el
*** lisp/descr-text.el	8 Dec 2005 01:38:50 -0000	1.43
--- lisp/descr-text.el	9 Dec 2005 09:55:57 -0000
***************
*** 160,166 ****
        (let ((buffer (current-buffer))
  	    (target-buffer "*Help*"))
  	(when (eq buffer (get-buffer target-buffer))
! 	  (setq target-buffer "*Help-2*"))
  	(save-excursion
  	  (with-output-to-temp-buffer target-buffer
  	    (set-buffer standard-output)
--- 160,166 ----
        (let ((buffer (current-buffer))
  	    (target-buffer "*Help*"))
  	(when (eq buffer (get-buffer target-buffer))
! 	  (setq target-buffer (generate-new-buffer-name "*Help*")))
  	(save-excursion
  	  (with-output-to-temp-buffer target-buffer
  	    (set-buffer standard-output)
***************
*** 466,472 ****
  				(char-to-string char)))))
  	 (orig-buf (current-buffer))
  	 (help-buf (if (eq orig-buf (get-buffer "*Help*"))
! 		       "*Help-2*" "*Help*"))
  	 item-list max-width unicode)
  
      (if (or (< char 256)
--- 466,473 ----
  				(char-to-string char)))))
  	 (orig-buf (current-buffer))
  	 (help-buf (if (eq orig-buf (get-buffer "*Help*"))
! 		       (generate-new-buffer-name "*Help*")
! 		     "*Help*"))
  	 item-list max-width unicode)
  
      (if (or (< char 256)
***************
*** 621,626 ****
--- 622,629 ----
  					 item-list)))
      (with-output-to-temp-buffer help-buf
        (with-current-buffer standard-output
+ 	(let ((help-xref-following t))
+ 	  (help-setup-xref nil nil))
  	(set-buffer-multibyte multibyte-p)
  	(let ((formatter (format "%%%ds:" max-width)))
  	  (dolist (elt item-list)
***************
*** 725,731 ****
  	(save-excursion
  	  (set-buffer orig-buf)
  	  (describe-text-properties pos help-buf))
! 	(describe-text-mode)))))
  
  (defalias 'describe-char-after 'describe-char)
  (make-obsolete 'describe-char-after 'describe-char "22.1")
--- 728,737 ----
  	(save-excursion
  	  (set-buffer orig-buf)
  	  (describe-text-properties pos help-buf))
! 	(describe-text-mode)
! 	(toggle-read-only 1)
! 	(help-make-xrefs (current-buffer))
! 	(print-help-return-message)))))
  
  (defalias 'describe-char-after 'describe-char)
  (make-obsolete 'describe-char-after 'describe-char "22.1")

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: confusing info in C-u C-x =
  2005-12-09  9:57     ` Juri Linkov
@ 2005-12-09 15:07       ` Kim F. Storm
  2005-12-09 21:15       ` Richard M. Stallman
  2005-12-11  0:55       ` Juri Linkov
  2 siblings, 0 replies; 17+ messages in thread
From: Kim F. Storm @ 2005-12-09 15:07 UTC (permalink / raw)
  Cc: schwab, emacs-devel, Kenichi Handa

Juri Linkov <juri@jurta.org> writes:

> I propose using (generate-new-buffer-name "*Help*") in both functions
> to generate the standard unique names like *Help*<2>.

I originally introduced *help-2*, but this seems to be TRT.
Please make that change.

>
> Also the *Help* buffer created by `describe-char' misses "[back]"

I'll let someone else comment on this part...

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: confusing info in C-u C-x =
  2005-12-09  9:57     ` Juri Linkov
  2005-12-09 15:07       ` Kim F. Storm
@ 2005-12-09 21:15       ` Richard M. Stallman
  2005-12-09 23:52         ` Juri Linkov
  2005-12-11  0:55       ` Juri Linkov
  2 siblings, 1 reply; 17+ messages in thread
From: Richard M. Stallman @ 2005-12-09 21:15 UTC (permalink / raw)
  Cc: schwab, emacs-devel, handa

    I propose using (generate-new-buffer-name "*Help*") in both functions
    to generate the standard unique names like *Help*<2>.

That would result in always creating a new buffer for this command.
That is not desirable at all.  Thanks, but we won't make this change.

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

* Re: confusing info in C-u C-x =
  2005-12-09 21:15       ` Richard M. Stallman
@ 2005-12-09 23:52         ` Juri Linkov
  2005-12-10 16:18           ` Richard M. Stallman
  2005-12-10 22:50           ` Kim F. Storm
  0 siblings, 2 replies; 17+ messages in thread
From: Juri Linkov @ 2005-12-09 23:52 UTC (permalink / raw)
  Cc: schwab, emacs-devel, handa

>     I propose using (generate-new-buffer-name "*Help*") in both functions
>     to generate the standard unique names like *Help*<2>.
>
> That would result in always creating a new buffer for this command.
> That is not desirable at all.  Thanks, but we won't make this change.

It already always creates a new buffer *Help-2*.  Do you mean that
`generate-new-buffer-name' can create more buffers like *Help*<3> and
*Help*<4>?  In this case, "*Help-2*" should be replaced with the constant
buffer name "*Help*<2>".

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: confusing info in C-u C-x =
  2005-12-09 23:52         ` Juri Linkov
@ 2005-12-10 16:18           ` Richard M. Stallman
  2005-12-11  0:46             ` Juri Linkov
  2005-12-10 22:50           ` Kim F. Storm
  1 sibling, 1 reply; 17+ messages in thread
From: Richard M. Stallman @ 2005-12-10 16:18 UTC (permalink / raw)
  Cc: schwab, emacs-devel, handa

    It already always creates a new buffer *Help-2*.  Do you mean that
    `generate-new-buffer-name' can create more buffers like *Help*<3> and
    *Help*<4>?

It will create a new buffer each time.

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

* Re: confusing info in C-u C-x =
  2005-12-09 23:52         ` Juri Linkov
  2005-12-10 16:18           ` Richard M. Stallman
@ 2005-12-10 22:50           ` Kim F. Storm
  1 sibling, 0 replies; 17+ messages in thread
From: Kim F. Storm @ 2005-12-10 22:50 UTC (permalink / raw)
  Cc: schwab, handa, rms, emacs-devel

Juri Linkov <juri@jurta.org> writes:

> It already always creates a new buffer *Help-2*.  Do you mean that
> `generate-new-buffer-name' can create more buffers like *Help*<3> and
> *Help*<4>?  In this case, "*Help-2*" should be replaced with the constant
> buffer name "*Help*<2>".

Yes.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: confusing info in C-u C-x =
  2005-12-10 16:18           ` Richard M. Stallman
@ 2005-12-11  0:46             ` Juri Linkov
  0 siblings, 0 replies; 17+ messages in thread
From: Juri Linkov @ 2005-12-11  0:46 UTC (permalink / raw)
  Cc: schwab, emacs-devel, handa

>     It already always creates a new buffer *Help-2*.  Do you mean that
>     `generate-new-buffer-name' can create more buffers like *Help*<3> and
>     *Help*<4>?
>
> It will create a new buffer each time.

Yes, I already realized what you meant.  Below is a new patch.

Index: lisp/descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.43
diff -c -r1.43 descr-text.el
*** lisp/descr-text.el	8 Dec 2005 01:38:50 -0000	1.43
--- lisp/descr-text.el	11 Dec 2005 00:45:56 -0000
***************
*** 160,166 ****
        (let ((buffer (current-buffer))
  	    (target-buffer "*Help*"))
  	(when (eq buffer (get-buffer target-buffer))
! 	  (setq target-buffer "*Help-2*"))
  	(save-excursion
  	  (with-output-to-temp-buffer target-buffer
  	    (set-buffer standard-output)
--- 160,166 ----
        (let ((buffer (current-buffer))
  	    (target-buffer "*Help*"))
  	(when (eq buffer (get-buffer target-buffer))
! 	  (setq target-buffer "*Help*<2>"))
  	(save-excursion
  	  (with-output-to-temp-buffer target-buffer
  	    (set-buffer standard-output)
***************
*** 466,472 ****
  				(char-to-string char)))))
  	 (orig-buf (current-buffer))
  	 (help-buf (if (eq orig-buf (get-buffer "*Help*"))
! 		       "*Help-2*" "*Help*"))
  	 item-list max-width unicode)
  
      (if (or (< char 256)
--- 466,472 ----
  				(char-to-string char)))))
  	 (orig-buf (current-buffer))
  	 (help-buf (if (eq orig-buf (get-buffer "*Help*"))
! 		       "*Help*<2>" "*Help*"))
  	 item-list max-width unicode)
  
      (if (or (< char 256)
***************
*** 621,626 ****
--- 621,628 ----
  					 item-list)))
      (with-output-to-temp-buffer help-buf
        (with-current-buffer standard-output
+ 	(let ((help-xref-following t))
+ 	  (help-setup-xref nil nil))
  	(set-buffer-multibyte multibyte-p)
  	(let ((formatter (format "%%%ds:" max-width)))
  	  (dolist (elt item-list)
***************
*** 725,731 ****
  	(save-excursion
  	  (set-buffer orig-buf)
  	  (describe-text-properties pos help-buf))
! 	(describe-text-mode)))))
  
  (defalias 'describe-char-after 'describe-char)
  (make-obsolete 'describe-char-after 'describe-char "22.1")
--- 727,736 ----
  	(save-excursion
  	  (set-buffer orig-buf)
  	  (describe-text-properties pos help-buf))
! 	(describe-text-mode)
! 	(toggle-read-only 1)
! 	(help-make-xrefs (current-buffer))
! 	(print-help-return-message)))))
  
  (defalias 'describe-char-after 'describe-char)
  (make-obsolete 'describe-char-after 'describe-char "22.1")

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: confusing info in C-u C-x =
  2005-12-09  9:57     ` Juri Linkov
  2005-12-09 15:07       ` Kim F. Storm
  2005-12-09 21:15       ` Richard M. Stallman
@ 2005-12-11  0:55       ` Juri Linkov
  2005-12-11 16:49         ` Richard M. Stallman
  2 siblings, 1 reply; 17+ messages in thread
From: Juri Linkov @ 2005-12-11  0:55 UTC (permalink / raw)


BTW, there is an old bug related to read-only text in the *Help*
buffer produced by `describe-char'.

On any character type `C-u C-x = C-h C-h' and it signals an error

  Text is read-only: "Attempt to change text outside editable field"

while it tries to display the help-for-help screen.

I recall there was a discussion about changing `erase-buffer'
to ignore read-only text.  If it is not the time to change this now,
then I propose the following fix:

Index: lisp/help-macro.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/help-macro.el,v
retrieving revision 1.34
diff -c -r1.34 help-macro.el
*** lisp/help-macro.el	6 Aug 2005 22:13:43 -0000	1.34
--- lisp/help-macro.el	11 Dec 2005 00:54:56 -0000
***************
*** 139,146 ****
  				(setq new-frame (window-frame (selected-window))
  				      config nil))
  			   (setq buffer-read-only nil)
! 			   (erase-buffer)
! 			   (insert help-screen)
  			   (help-mode)
  			   (goto-char (point-min))
  			   (while (or (memq char (append help-event-list
--- 139,147 ----
  				(setq new-frame (window-frame (selected-window))
  				      config nil))
  			   (setq buffer-read-only nil)
! 			   (let ((inhibit-read-only t))
! 			     (erase-buffer)
! 			     (insert help-screen))
  			   (help-mode)
  			   (goto-char (point-min))
  			   (while (or (memq char (append help-event-list

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: confusing info in C-u C-x =
  2005-12-11  0:55       ` Juri Linkov
@ 2005-12-11 16:49         ` Richard M. Stallman
  0 siblings, 0 replies; 17+ messages in thread
From: Richard M. Stallman @ 2005-12-11 16:49 UTC (permalink / raw)
  Cc: emacs-devel

    On any character type `C-u C-x = C-h C-h' and it signals an error

      Text is read-only: "Attempt to change text outside editable field"

Please install your fix.

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

end of thread, other threads:[~2005-12-11 16:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-20  9:55 confusing info in C-u C-x = Werner LEMBERG
2005-11-20 15:16 ` Andreas Schwab
2005-11-20 22:07   ` [SPAM?]: " Werner LEMBERG
2005-11-21  7:35   ` Juri Linkov
2005-12-08  1:49   ` Kenichi Handa
2005-12-09  9:57     ` Juri Linkov
2005-12-09 15:07       ` Kim F. Storm
2005-12-09 21:15       ` Richard M. Stallman
2005-12-09 23:52         ` Juri Linkov
2005-12-10 16:18           ` Richard M. Stallman
2005-12-11  0:46             ` Juri Linkov
2005-12-10 22:50           ` Kim F. Storm
2005-12-11  0:55       ` Juri Linkov
2005-12-11 16:49         ` Richard M. Stallman
2005-11-20 23:21 ` Richard M. Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-11-20 19:35 martin rudalics
2005-11-21  8:56 martin rudalics

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).