* bug#19085: 25.0.50; eww: text fields and undo
@ 2014-11-17 18:51 Mark Oteiza
2014-11-27 16:26 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Mark Oteiza @ 2014-11-17 18:51 UTC (permalink / raw)
To: 19085
This is sort of two related issues.
First, text fields are barely usable as it stands:
1. M-x eww RET foo RET
2. tab to duckduckgo search field
3. C-k
Point is now beyond the search field. Putting point on the text inside
the search field and trying to delete it (C-d) seems to delete the field
itself, so it's still possible to delete the entry field.
Next, because eww-mode has (buffer-disable-undo), it is impossible to undo
edits. It is troublesome because one cannot undo accidentally
deleting part of the web page, further because it is
impossible to undo edits in text fields.
Off the top of my head, fields for text entry are perfectly fine in
"customize" and "notmuch".
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2014-11-16 on logos
Repository revision: 058f56d24f776bdc25bcac86fe1f8969a78374e9
Configured using:
`configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --without-gconf --with-x-toolkit=lucid
'CFLAGS=-march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong
--param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
Important settings:
value of $LC_COLLATE: C
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
flycheck-mode: t
company-mode: t
show-paren-mode: t
savehist-mode: t
winner-mode: t
url-handler-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
Recent messages:
Loading /home/mvo/.cache/emacs/custom.el (source)...done
Loading /home/mvo/.emacs.d/site-lisp/loaddefs.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
/usr/share/emacs/25.0.50/lisp/loaddefs hides /home/mvo/.emacs.d/site-lisp/loaddefs
/usr/share/emacs/25.0.50/lisp/env hides /home/mvo/.emacs.d/site-lisp/expand-region/features/support/env
Features:
(shadow sort mail-extr emacsbug message idna dired format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
xterm flycheck find-func help-mode rx easymenu subr-x pcase dash
company-files company-oddmuse company-keywords company-etags etags
company-gtags company-dabbrev-code company-dabbrev company-capf
company-cmake company-ropemacs company-xcode company-clang
company-semantic company-eclim company-template company-css company-nxml
company-bbdb company package epg-config windmove edmacro kmacro
saveplace paren savehist winner ring url-handlers url-parse auth-source
cl-macs gv eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core cl-loaddefs cl-lib gnus-util time-date mm-util help-fns
mail-prsvr password-cache url-vars zenburn-theme tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)
Memory information:
((conses 16 127916 6984)
(symbols 48 22839 0)
(miscs 40 58 119)
(strings 32 28974 8040)
(string-bytes 1 792141)
(vectors 16 19247)
(vector-slots 8 1148221 194749)
(floats 8 94 644)
(intervals 56 228 0)
(buffers 976 11)
(heap 1024 30137 1388))
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2014-11-17 18:51 bug#19085: 25.0.50; eww: text fields and undo Mark Oteiza
@ 2014-11-27 16:26 ` Lars Magne Ingebrigtsen
2014-11-27 17:26 ` Mark Oteiza
0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-11-27 16:26 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Mark Oteiza <mvoteiza@udel.edu> writes:
> 1. M-x eww RET foo RET
> 2. tab to duckduckgo search field
> 3. C-k
>
> Point is now beyond the search field. Putting point on the text inside
> the search field and trying to delete it (C-d) seems to delete the field
> itself, so it's still possible to delete the entry field.
Should be fixed now.
> Next, because eww-mode has (buffer-disable-undo), it is impossible to undo
> edits. It is troublesome because one cannot undo accidentally
> deleting part of the web page,
That should not be possible.
> further because it is impossible to undo edits in text fields.
Hm... It might be nice to have undo in the text fields...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2014-11-27 16:26 ` Lars Magne Ingebrigtsen
@ 2014-11-27 17:26 ` Mark Oteiza
2014-12-02 14:02 ` Ivan Shmakov
2016-02-02 4:30 ` Lars Ingebrigtsen
0 siblings, 2 replies; 15+ messages in thread
From: Mark Oteiza @ 2014-11-27 17:26 UTC (permalink / raw)
To: 19085
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>> Putting point on the text inside
>> the search field and trying to delete it (C-d) seems to delete the field
>> itself, so it's still possible to delete the entry field.
>
> Should be fixed now.
Seems that way.
>> 1. M-x eww RET foo RET
>> 2. tab to duckduckgo search field
>> 3. C-k
>>
>> Point is now beyond the search field.
This is still broken.
Here's another example:
1. enter "two words" into the text field
2. M-b
3. M-t ad infinitum
one can grow the text box.
>> further because it is impossible to undo edits in text fields.
>
> Hm... It might be nice to have undo in the text fields...
AFAICT, notmuch's notmuch-hello.el and Emacs' custom.el both do “readonly
buffer with completely functional text entry widgets” perfectly.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2014-11-27 17:26 ` Mark Oteiza
@ 2014-12-02 14:02 ` Ivan Shmakov
2016-02-02 4:28 ` Lars Ingebrigtsen
2016-02-02 4:30 ` Lars Ingebrigtsen
1 sibling, 1 reply; 15+ messages in thread
From: Ivan Shmakov @ 2014-12-02 14:02 UTC (permalink / raw)
To: 19085
>>>>> Mark Oteiza <mvoteiza@udel.edu> writes:
>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
[…]
>>> Next, because eww-mode has (buffer-disable-undo), it is impossible
>>> to undo edits. It is troublesome because one cannot undo
>>> accidentally deleting part of the web page, further because it is
>>> impossible to undo edits in text fields.
>> Hm... It might be nice to have undo in the text fields...
> AFAICT, notmuch's notmuch-hello.el and Emacs' custom.el both do
> “readonly buffer with completely functional text entry widgets”
> perfectly.
Which makes me wonder if EWW could make use of the facilities
provided by 'wid-edit for its forms – just like the rest of
Emacs appears to do?
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2014-12-02 14:02 ` Ivan Shmakov
@ 2016-02-02 4:28 ` Lars Ingebrigtsen
0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 4:28 UTC (permalink / raw)
To: 19085
Ivan Shmakov <ivan@siamics.net> writes:
> Which makes me wonder if EWW could make use of the facilities
> provided by 'wid-edit for its forms – just like the rest of
> Emacs appears to do?
No, reusing the Widget code for non-widget buffers is pretty futile if
you're doing non-trivial stuff. It sets up so many buffer-local
variables and uses overlays that it's next to impossible to be flexible
about it. shr uses many buffers for rendering, and then mashes them
together in one buffer, and that doesn't really work for Widget.
(shr used to use Widget before I gave up.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2014-11-27 17:26 ` Mark Oteiza
2014-12-02 14:02 ` Ivan Shmakov
@ 2016-02-02 4:30 ` Lars Ingebrigtsen
2016-02-02 4:45 ` Mark Oteiza
1 sibling, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 4:30 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Mark Oteiza <mvoteiza@udel.edu> writes:
>>> 1. M-x eww RET foo RET
>>> 2. tab to duckduckgo search field
>>> 3. C-k
>>>
>>> Point is now beyond the search field.
>
> This is still broken.
>
> Here's another example:
>
> 1. enter "two words" into the text field
> 2. M-b
> 3. M-t ad infinitum
>
> one can grow the text box.
It seems to work for me. `M-t' between two words just juxtaposes the
two words.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 4:30 ` Lars Ingebrigtsen
@ 2016-02-02 4:45 ` Mark Oteiza
2016-02-02 5:00 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Mark Oteiza @ 2016-02-02 4:45 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19085
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
On 02/02/16 at 05:30am, Lars Ingebrigtsen wrote:
> Mark Oteiza <mvoteiza@udel.edu> writes:
>
> >>> 1. M-x eww RET foo RET
> >>> 2. tab to duckduckgo search field
> >>> 3. C-k
> >>>
> >>> Point is now beyond the search field.
> >
> > This is still broken.
> >
> > Here's another example:
> >
> > 1. enter "two words" into the text field
> > 2. M-b
> > 3. M-t ad infinitum
> >
> > one can grow the text box.
>
> It seems to work for me. `M-t' between two words just juxtaposes the
> two words.
It breaks on wikipedia and fsf.org here, for a couple examples.
[-- Attachment #2: foobar.png --]
[-- Type: image/png, Size: 91400 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 4:45 ` Mark Oteiza
@ 2016-02-02 5:00 ` Lars Ingebrigtsen
2016-02-02 5:06 ` Mark Oteiza
0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 5:00 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Mark Oteiza <mvoteiza@udel.edu> writes:
> It breaks on wikipedia and fsf.org here, for a couple examples.
Do you have a step-by-step recipe for how to see this bug?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:00 ` Lars Ingebrigtsen
@ 2016-02-02 5:06 ` Mark Oteiza
2016-02-02 5:10 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Mark Oteiza @ 2016-02-02 5:06 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19085
On 02/02/16 at 04:00pm, Lars Ingebrigtsen wrote:
> Mark Oteiza <mvoteiza@udel.edu> writes:
>
> > It breaks on wikipedia and fsf.org here, for a couple examples.
>
> Do you have a step-by-step recipe for how to see this bug?
From -Q:
1. M-x eww RET https://fsf.org RET
2. C-s search C-s all down to the search field
3. Put point on the second character of the search field,
because the first grey character isn't actually part of the search
field for some reason
4. Enter "foo bar"
5. M-b to put point between "foo" and "bar"
6. Mash M-t
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:06 ` Mark Oteiza
@ 2016-02-02 5:10 ` Lars Ingebrigtsen
2016-02-02 5:30 ` Lars Ingebrigtsen
2016-02-02 5:51 ` Lars Ingebrigtsen
0 siblings, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 5:10 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Mark Oteiza <mvoteiza@udel.edu> writes:
> 1. M-x eww RET https://fsf.org RET
> 2. C-s search C-s all down to the search field
> 3. Put point on the second character of the search field,
> because the first grey character isn't actually part of the search
> field for some reason
> 4. Enter "foo bar"
> 5. M-b to put point between "foo" and "bar"
> 6. Mash M-t
Ah, I see it now. The bug is actually when doing `M-t' after the last
word in the field. Which should just signal an error instead of doing
anything. I wonder why it's not doing that -- the "Seach" button should
be read-only...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:10 ` Lars Ingebrigtsen
@ 2016-02-02 5:30 ` Lars Ingebrigtsen
2016-02-02 5:51 ` Lars Ingebrigtsen
1 sibling, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 5:30 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Ah, I see it now. The bug is actually when doing `M-t' after the last
> word in the field. Which should just signal an error instead of doing
> anything. I wonder why it's not doing that -- the "Seach" button should
> be read-only...
It's rather fascinating. If you insert this into a buffer and then
`M-t' between the words (with debugging switched on):
(insert "foo " (propertize "bar\nzot" 'read-only t))
You'll get a buffer with
bar foobar
zot
while showing the backtrace. But continuing restores what was there,
because it's called in `atomic-change-group' form.
However, when doing the restoration, the `after-change-functions'
function isn't run, so eww doesn't restore the length. Is that a bug in
`atomic-change-group'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:10 ` Lars Ingebrigtsen
2016-02-02 5:30 ` Lars Ingebrigtsen
@ 2016-02-02 5:51 ` Lars Ingebrigtsen
2016-02-02 6:07 ` Lars Ingebrigtsen
2016-02-02 7:04 ` Lars Ingebrigtsen
1 sibling, 2 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 5:51 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19085
Looking at the customize code, the way it manages to survive commands
like `M-t' it by having a before-change-functions that signals the
read-only-ness of everything that isn't a widget, and by adding a
post-command-hook when it errors out to try to restore things, by
extending the text fields to the end of the window, and it still says
EDITED, shown value does not take effect until you set or save it.
if you `M-t' a text field.
This stuff is hard.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:51 ` Lars Ingebrigtsen
@ 2016-02-02 6:07 ` Lars Ingebrigtsen
2016-02-02 7:04 ` Lars Ingebrigtsen
1 sibling, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 6:07 UTC (permalink / raw)
To: 19085
No, after-change-functions is being called when doing the clean-up, but
since it thinks that it knows the position of everything, and eww does
too, they're working at cross purpose. Hm.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 5:51 ` Lars Ingebrigtsen
2016-02-02 6:07 ` Lars Ingebrigtsen
@ 2016-02-02 7:04 ` Lars Ingebrigtsen
2016-02-04 4:30 ` Lars Ingebrigtsen
1 sibling, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-02 7:04 UTC (permalink / raw)
To: 19085
There were several things going wrong at the same time. First of all,
the after-change-function's changes were being recorded by the undo
mechanism (used by the atomic thing to allow undoing on errors). With
that disabled, things worked better.
And the first character in the first input field in a form being marked
wrongly didn't help the confusion.
`M-t' now basically works in most cases, but if you `M-t' near the end
of the field, it's still extended on undo. I'll get that corner case
fixed to, but not today.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#19085: 25.0.50; eww: text fields and undo
2016-02-02 7:04 ` Lars Ingebrigtsen
@ 2016-02-04 4:30 ` Lars Ingebrigtsen
0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-04 4:30 UTC (permalink / raw)
To: 19085
Lars Ingebrigtsen <larsi@gnus.org> writes:
> `M-t' now basically works in most cases, but if you `M-t' near the end
> of the field, it's still extended on undo. I'll get that corner case
> fixed to, but not today.
Actually, I think that's consistent behaviour, just about. Text fields
should grow when there's more text inserted in them (beyond the original
length), so that's OK.
And undo now also works, it looks like.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-02-04 4:30 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 18:51 bug#19085: 25.0.50; eww: text fields and undo Mark Oteiza
2014-11-27 16:26 ` Lars Magne Ingebrigtsen
2014-11-27 17:26 ` Mark Oteiza
2014-12-02 14:02 ` Ivan Shmakov
2016-02-02 4:28 ` Lars Ingebrigtsen
2016-02-02 4:30 ` Lars Ingebrigtsen
2016-02-02 4:45 ` Mark Oteiza
2016-02-02 5:00 ` Lars Ingebrigtsen
2016-02-02 5:06 ` Mark Oteiza
2016-02-02 5:10 ` Lars Ingebrigtsen
2016-02-02 5:30 ` Lars Ingebrigtsen
2016-02-02 5:51 ` Lars Ingebrigtsen
2016-02-02 6:07 ` Lars Ingebrigtsen
2016-02-02 7:04 ` Lars Ingebrigtsen
2016-02-04 4:30 ` Lars Ingebrigtsen
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).