all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* completion should not inherit read-only property
@ 2006-12-07 17:44 T. V. Raman
  2006-12-07 22:43 ` Kevin Rodgers
  2006-12-08  5:04 ` Richard Stallman
  0 siblings, 2 replies; 8+ messages in thread
From: T. V. Raman @ 2006-12-07 17:44 UTC (permalink / raw)


I've noticed that recently, completion has started inheriting the
read-only property.

Test: if you have a string in a read-only buffer
e.g. foobarbasbar 

and you then type foo and complete it to foobarbasbar  using
command `complete' then the completed string ends up read-only. 

This is an irritant because if this happens to you in a mail
composition buffer (I use vm) then sending mail fails because
part of the buffer is read-only --- you end up having to eval
the appropriate lisp expression to remove the read-only property
with something like:
(let ((inhibit-read-only t))
    (put-text-property start end
                       'read-only nil))

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: completion should not inherit read-only property
  2006-12-07 17:44 completion should not inherit read-only property T. V. Raman
@ 2006-12-07 22:43 ` Kevin Rodgers
  2006-12-13  3:12   ` T. V. Raman
  2006-12-08  5:04 ` Richard Stallman
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Rodgers @ 2006-12-07 22:43 UTC (permalink / raw)


T. V. Raman wrote:
> I've noticed that recently, completion has started inheriting the
> read-only property.
> 
> Test: if you have a string in a read-only buffer
> e.g. foobarbasbar 
> 
> and you then type foo and complete it to foobarbasbar  using
> command `complete' then the completed string ends up read-only. 

What is this command `complete'?  What major and minor modes are
you using and how do you invoke `complete'?

> This is an irritant because if this happens to you in a mail
> composition buffer (I use vm) then sending mail fails because
> part of the buffer is read-only --- you end up having to eval
> the appropriate lisp expression to remove the read-only property
> with something like:
> (let ((inhibit-read-only t))
>     (put-text-property start end
>                        'read-only nil))

-- 
Kevin

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

* Re: completion should not inherit read-only property
  2006-12-07 17:44 completion should not inherit read-only property T. V. Raman
  2006-12-07 22:43 ` Kevin Rodgers
@ 2006-12-08  5:04 ` Richard Stallman
  2006-12-13  3:11   ` T. V. Raman
  1 sibling, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2006-12-08  5:04 UTC (permalink / raw)
  Cc: emacs-devel

    Test: if you have a string in a read-only buffer
    e.g. foobarbasbar 

    and you then type foo and complete it to foobarbasbar  using
    command `complete' then the completed string ends up read-only. 

This is clearly a bug, but the test case is not clear to me.
I am not sure what precisely to type so as to reproduce the bug.
Could you please send a precise test case to use for debugging?

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

* Re: completion should not inherit read-only property
  2006-12-08  5:04 ` Richard Stallman
@ 2006-12-13  3:11   ` T. V. Raman
  2006-12-13 22:02     ` Richard Stallman
  2006-12-14 18:43     ` Kevin Rodgers
  0 siblings, 2 replies; 8+ messages in thread
From: T. V. Raman @ 2006-12-13  3:11 UTC (permalink / raw)
  Cc: raman, emacs-devel


Hard to create a test case ...
mostly because just making a buffer read-only doesn't put the
read-only property on a string. But certain Emacs apps
emacs-jabber is one that comes to mind, carefully annotate
portions of the buffer with the read-only property --- and when
completion picks up one of those strings, the bug appears to
bite.

This is one of those things that happens a couple of times a week
while you're using emacs fluently, and it's difficult to
reproduce the exact circumstances.

>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
    Richard>     Test: if you have a string in a read-only buffer
    Richard> e.g. foobarbasbar
    Richard> 
    Richard>     and you then type foo and complete it to
    Richard> foobarbasbar using command `complete' then the
    Richard> completed string ends up read-only.
    Richard> 
    Richard> This is clearly a bug, but the test case is not
    Richard> clear to me.  I am not sure what precisely to type
    Richard> so as to reproduce the bug.  Could you please send a
    Richard> precise test case to use for debugging?

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: completion should not inherit read-only property
  2006-12-07 22:43 ` Kevin Rodgers
@ 2006-12-13  3:12   ` T. V. Raman
  2006-12-14 18:48     ` Kevin Rodgers
  0 siblings, 1 reply; 8+ messages in thread
From: T. V. Raman @ 2006-12-13  3:12 UTC (permalink / raw)
  Cc: emacs-devel


Somewhat surprized by the question "what is this command
`complete'" my emacs says:
complete is an interactive compiled Lisp function in `completion.el'.
It is bound to  CONTROL RETURN ,  META SPACE .
(complete &optional ARG)

Fill out a completion of the word before point.
Point is left at end.  Consecutive calls rotate through all possibilities.
Prefix args ::
  control-u :: leave the point at the beginning of the completion rather
               than at the end.
  a number  :: rotate through the possible completions by that amount
  `-'       :: same as -1 (insert previous completion)
 {See the comments at the top of `completion.el' for more info.}

This function is advised.

Around-advice `emacspeak':
Say what you completed.

[back]


>>>>> "Kevin" == Kevin Rodgers <ihs_4664@yahoo.com> writes:
    Kevin> T. V. Raman wrote:
    >> I've noticed that recently, completion has started
    >> inheriting the read-only property.
    >> 
    >> Test: if you have a string in a read-only buffer
    >> e.g. foobarbasbar
    >> 
    >> and you then type foo and complete it to foobarbasbar
    >> using command `complete' then the completed string ends up
    >> read-only.
    Kevin> 
    Kevin> What is this command `complete'?  What major and minor
    Kevin> modes are you using and how do you invoke `complete'?
    Kevin> 
    >> This is an irritant because if this happens to you in a
    >> mail composition buffer (I use vm) then sending mail fails
    >> because part of the buffer is read-only --- you end up
    >> having to eval the appropriate lisp expression to remove
    >> the read-only property with something like: (let
    >> ((inhibit-read-only t)) (put-text-property start end
    >> 'read-only nil))
    Kevin> 
    Kevin> -- Kevin
    Kevin> 
    Kevin> 
    Kevin> 
    Kevin> _______________________________________________
    Kevin> Emacs-devel mailing list Emacs-devel@gnu.org
    Kevin> http://lists.gnu.org/mailman/listinfo/emacs-devel

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

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

* Re: completion should not inherit read-only property
  2006-12-13  3:11   ` T. V. Raman
@ 2006-12-13 22:02     ` Richard Stallman
  2006-12-14 18:43     ` Kevin Rodgers
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2006-12-13 22:02 UTC (permalink / raw)
  Cc: raman, emacs-devel

We really need a test case so we can fix it.
Or, if you can figure out what part of the code does this
inheritance, maybe we can fix it from that.

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

* Re: completion should not inherit read-only property
  2006-12-13  3:11   ` T. V. Raman
  2006-12-13 22:02     ` Richard Stallman
@ 2006-12-14 18:43     ` Kevin Rodgers
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2006-12-14 18:43 UTC (permalink / raw)


T. V. Raman wrote:
> Hard to create a test case ...
> mostly because just making a buffer read-only doesn't put the
> read-only property on a string.

(put-text-property (point-min) (point-max) 'read-only t)

-- 
Kevin

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

* Re: completion should not inherit read-only property
  2006-12-13  3:12   ` T. V. Raman
@ 2006-12-14 18:48     ` Kevin Rodgers
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2006-12-14 18:48 UTC (permalink / raw)


T. V. Raman wrote:
> Somewhat surprized by the question "what is this command
> `complete'" my emacs says:
> complete is an interactive compiled Lisp function in `completion.el'.
 > It is bound to  CONTROL RETURN ,  META SPACE .

Not in emacs -Q: completion.el is not dumped into the emacs executable,
nor are are any key sequences bound to its only autoloaded function
(dynamic-completion-mode).

> (complete &optional ARG)
> 
> Fill out a completion of the word before point.
> Point is left at end.  Consecutive calls rotate through all possibilities.
> Prefix args ::
>   control-u :: leave the point at the beginning of the completion rather
>                than at the end.
>   a number  :: rotate through the possible completions by that amount
>   `-'       :: same as -1 (insert previous completion)
>  {See the comments at the top of `completion.el' for more info.}
> 
> This function is advised.
> 
> Around-advice `emacspeak':
> Say what you completed.
> 
> [back]

-- 
Kevin

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

end of thread, other threads:[~2006-12-14 18:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 17:44 completion should not inherit read-only property T. V. Raman
2006-12-07 22:43 ` Kevin Rodgers
2006-12-13  3:12   ` T. V. Raman
2006-12-14 18:48     ` Kevin Rodgers
2006-12-08  5:04 ` Richard Stallman
2006-12-13  3:11   ` T. V. Raman
2006-12-13 22:02     ` Richard Stallman
2006-12-14 18:43     ` Kevin Rodgers

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.