unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Hansen <larsh@math.ku.dk>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: [BUG] widget-field-overlay becomes wrong
Date: Fri, 09 Jul 2004 23:10:02 +0200	[thread overview]
Message-ID: <40EF09AA.3010207@math.ku.dk> (raw)
In-Reply-To: <rj8ydvx0ue.fsf@sheridan.dina.kvl.dk>

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

Per Abrahamsen wrote:
> I could not make fields work correctly unless they were separated by
> some text, so that was a a basic restriction in the design.  It should
> be documented as such. 

One more comment on the subject.

 From what you write, and from what is in the manual, it suffices that 
"fields are surrounded by static text". However that is not enough.
The text may not be part of another widget. Even worse, in the 
programming example, this rule is broken! So if you run the example, you 
will see the "bug" i reported (click the Choose button).

The patch attached should correct these problems.

[-- Attachment #2: widget.texi.diff --]
[-- Type: text/plain, Size: 1711 bytes --]

*** emacs/LH-work/widget/widget-1.26.texi	Thu Apr 29 21:25:31 2004
--- cvsroot/emacs/man/widget.texi	Fri Jul  9 22:54:45 2004
***************
*** 213,219 ****
  
  Editable text fields are created by the @code{editable-field} widget.
  
! An editable field must be surrounded by static text on both sides, that
  is, text that does not change in the lifetime of the widget.  If the
  field extends to the end of the line, the terminating line-feed character
  will count as the necessary static text on that end, but you will have
--- 213,220 ----
  
  Editable text fields are created by the @code{editable-field} widget.
  
! In an @code{editable-field} widget, the editable field must be
! surrounded by static text on both sides, that
  is, text that does not change in the lifetime of the widget.  If the
  field extends to the end of the line, the terminating line-feed character
  will count as the necessary static text on that end, but you will have
***************
*** 221,226 ****
--- 222,229 ----
  @code{:format} keyword is useful for generating the static text; for
  instance, if you give it a value of @code{"Name: %v"}, the "Name: " part
  will count as the static text.
+ Observe that static text belonging to another widget does @emph{not}
+ count, however text inserted with @code{widget-insert} does.
  
  The editing text fields are highlighted with the
  @code{widget-field-face} face, making them easy to find.
***************
*** 345,350 ****
--- 348,354 ----
    (widget-insert "Here is some documentation.\n\nName: ")
    (widget-create 'editable-field
  		 :size 13
+ 		 :format "%v " ; Static text after the field!
  		 "My Name")
    (widget-create 'menu-choice
  		 :tag "Choose"

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2004-07-09 21:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30  9:46 [BUG] widget-field-overlay becomes wrong Lars Hansen
2004-07-01 17:14 ` Richard Stallman
2004-07-01 20:08   ` Lars Hansen
2004-07-02  6:02     ` Lars Hansen
2004-07-03 18:20       ` Richard Stallman
2004-07-04  9:47         ` Lars Hansen
2004-07-07 16:02   ` Per Abrahamsen
2004-07-08 12:30     ` Lars Hansen
2004-07-08 23:18     ` Richard Stallman
2004-07-09 21:10     ` Lars Hansen [this message]
2004-07-13 15:00       ` Per Abrahamsen
2004-07-14  7:00         ` Lars Hansen
2004-07-19  7:31           ` Per Abrahamsen
2004-07-19 18:44             ` Richard Stallman
2004-07-23 16:24               ` Per Abrahamsen
2004-07-24 16:28                 ` Lars Hansen
2004-08-01 15:18                   ` Per Abrahamsen
2004-08-02  9:08                     ` Lars Hansen
2004-08-02 12:21                       ` Per Abrahamsen
2004-07-24 19:43                 ` Richard Stallman
2004-08-01 15:33                   ` Per Abrahamsen
2004-08-02  9:07                     ` Lars Hansen
2004-08-03 19:37                       ` Richard Stallman
2004-08-03 21:18                         ` Lars Hansen
2004-08-03 21:25                           ` Lars Hansen
2004-08-05  4:22                             ` Richard Stallman
2004-08-05  6:22                               ` Lars Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40EF09AA.3010207@math.ku.dk \
    --to=larsh@math.ku.dk \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).