* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional @ 2016-01-25 23:19 Glenn Morris 2016-05-06 5:48 ` Paul Eggert 0 siblings, 1 reply; 7+ messages in thread From: Glenn Morris @ 2016-01-25 23:19 UTC (permalink / raw) To: 22465 Package: emacs Version: 25.0.50 When xwidget-webkit-scroll-behavior = image, the functions xwidget-webkit-scroll-forward and xwidget-webkit-scroll-backward are obviously broken (they just call themselves recursively forever). ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-01-25 23:19 bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional Glenn Morris @ 2016-05-06 5:48 ` Paul Eggert 2016-05-06 15:42 ` Glenn Morris 0 siblings, 1 reply; 7+ messages in thread From: Paul Eggert @ 2016-05-06 5:48 UTC (permalink / raw) To: Glenn Morris; +Cc: 22465 [-- Attachment #1: Type: text/plain, Size: 81 bytes --] Attached is a proposed patch for this bug. It is not fancy, but it works for me. [-- Attachment #2: 0001-Fix-xwidget-webkit-scroll-forward-infloop.fix --] [-- Type: text/plain, Size: 1395 bytes --] From 879895ad058294eb49d8372ef5dbf053973e45b9 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Thu, 5 May 2016 22:44:16 -0700 Subject: [PATCH] Fix xwidget-webkit-scroll-forward infloop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/xwidget.el (xwidget-webkit-scroll-forward) (xwidget-webkit-scroll-backward): Don’t loop if xwidget-webkit-scroll-behavior’s value is ‘image’ (Bug#22465). --- lisp/xwidget.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 19f631f..d64237a 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -165,7 +165,7 @@ xwidget-webkit-scroll-forward (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) - (xwidget-webkit-scroll-forward))) ; FIXME infloop! + (image-forward-hscroll 5))) (defun xwidget-webkit-scroll-backward () "Scroll webkit backwards. @@ -174,7 +174,7 @@ xwidget-webkit-scroll-backward (interactive) (if (eq xwidget-webkit-scroll-behavior 'native) (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) - (xwidget-webkit-scroll-backward))) ; FIXME infloop! + (image-backward-hscroll 5))) ;; The xwidget event needs to go into a higher level handler -- 2.7.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-05-06 5:48 ` Paul Eggert @ 2016-05-06 15:42 ` Glenn Morris 2016-05-06 17:50 ` joakim 0 siblings, 1 reply; 7+ messages in thread From: Glenn Morris @ 2016-05-06 15:42 UTC (permalink / raw) To: Paul Eggert; +Cc: 22465, Joakim Verona Paul Eggert wrote: > Attached is a proposed patch for this bug. It is not fancy, but it > works for me. Thanks. I wonder if the 'image scrolling method should simply be removed, since it doesn't work (to date) and isn't the default. Are two methods really needed/useful? > From 879895ad058294eb49d8372ef5dbf053973e45b9 Mon Sep 17 00:00:00 2001 > From: Paul Eggert <eggert@cs.ucla.edu> > Date: Thu, 5 May 2016 22:44:16 -0700 > Subject: [PATCH] Fix xwidget-webkit-scroll-forward infloop > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > * lisp/xwidget.el (xwidget-webkit-scroll-forward) > (xwidget-webkit-scroll-backward): Don't loop if > xwidget-webkit-scroll-behavior's value is 'image' (Bug#22465). > --- > lisp/xwidget.el | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lisp/xwidget.el b/lisp/xwidget.el > index 19f631f..d64237a 100644 > --- a/lisp/xwidget.el > +++ b/lisp/xwidget.el > @@ -165,7 +165,7 @@ xwidget-webkit-scroll-forward > (interactive) > (if (eq xwidget-webkit-scroll-behavior 'native) > (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) > - (xwidget-webkit-scroll-forward))) ; FIXME infloop! > + (image-forward-hscroll 5))) > > (defun xwidget-webkit-scroll-backward () > "Scroll webkit backwards. > @@ -174,7 +174,7 @@ xwidget-webkit-scroll-backward > (interactive) > (if (eq xwidget-webkit-scroll-behavior 'native) > (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) > - (xwidget-webkit-scroll-backward))) ; FIXME infloop! > + (image-backward-hscroll 5))) > > > ;; The xwidget event needs to go into a higher level handler ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-05-06 15:42 ` Glenn Morris @ 2016-05-06 17:50 ` joakim 2016-05-08 0:21 ` Paul Eggert 0 siblings, 1 reply; 7+ messages in thread From: joakim @ 2016-05-06 17:50 UTC (permalink / raw) To: Glenn Morris; +Cc: 22465, Paul Eggert Glenn Morris <rgm@gnu.org> writes: > Paul Eggert wrote: > >> Attached is a proposed patch for this bug. It is not fancy, but it >> works for me. > > Thanks. I wonder if the 'image scrolling method should simply be > removed, since it doesn't work (to date) and isn't the default. > Are two methods really needed/useful? Short version: It is probably just as well to remove the 'image method. Long version: The 'image method was the original scrolling method, which simply makes a large xwidget and scrolls it using the same method as emacs uses to scroll images. I liked this method because it was consistent with other Emacs scrolling. The 'native method lets webkit do the scrolling. Originally I used the 'image method myself and added the 'native method because users wanted it. Now I never use 'image, only 'native. Perhaps someone still prefers the 'image method though. > >> From 879895ad058294eb49d8372ef5dbf053973e45b9 Mon Sep 17 00:00:00 2001 >> From: Paul Eggert <eggert@cs.ucla.edu> >> Date: Thu, 5 May 2016 22:44:16 -0700 >> Subject: [PATCH] Fix xwidget-webkit-scroll-forward infloop >> MIME-Version: 1.0 >> Content-Type: text/plain; charset=UTF-8 >> Content-Transfer-Encoding: 8bit >> >> * lisp/xwidget.el (xwidget-webkit-scroll-forward) >> (xwidget-webkit-scroll-backward): Don't loop if >> xwidget-webkit-scroll-behavior's value is 'image' (Bug#22465). >> --- >> lisp/xwidget.el | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lisp/xwidget.el b/lisp/xwidget.el >> index 19f631f..d64237a 100644 >> --- a/lisp/xwidget.el >> +++ b/lisp/xwidget.el >> @@ -165,7 +165,7 @@ xwidget-webkit-scroll-forward >> (interactive) >> (if (eq xwidget-webkit-scroll-behavior 'native) >> (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) >> - (xwidget-webkit-scroll-forward))) ; FIXME infloop! >> + (image-forward-hscroll 5))) >> >> (defun xwidget-webkit-scroll-backward () >> "Scroll webkit backwards. >> @@ -174,7 +174,7 @@ xwidget-webkit-scroll-backward >> (interactive) >> (if (eq xwidget-webkit-scroll-behavior 'native) >> (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) >> - (xwidget-webkit-scroll-backward))) ; FIXME infloop! >> + (image-backward-hscroll 5))) >> >> >> ;; The xwidget event needs to go into a higher level handler -- Joakim Verona ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-05-06 17:50 ` joakim @ 2016-05-08 0:21 ` Paul Eggert 2016-05-13 8:05 ` joakim 0 siblings, 1 reply; 7+ messages in thread From: Paul Eggert @ 2016-05-08 0:21 UTC (permalink / raw) To: joakim, Glenn Morris; +Cc: 22465 [-- Attachment #1: Type: text/plain, Size: 347 bytes --] joakim@verona.se wrote: > Perhaps someone still prefers the 'image method though. This seems unlikely, given that it recurses infinitely whenever it scrolls left or right. Anyway, thanks for following up. If nobody objects I would like to install the attached patch to emacs-25 to remove xwidget-webkit-scroll-behavior and therefore fix the bug. [-- Attachment #2: 0001-Remove-buggy-non-native-image-scrolling.patch --] [-- Type: text/x-diff, Size: 3749 bytes --] From 58b7ecc4bcba46c775a7edca209587f034185861 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sat, 7 May 2016 17:17:55 -0700 Subject: [PATCH] Remove buggy non-native image scrolling This never worked, and could cause infinite recursion. Problem reported by Glenn Morris (Bug#22465). * lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove. All uses removed. --- lisp/xwidget.el | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 19f631f..7a0ca8b 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -34,13 +34,6 @@ (require 'cl-lib) (require 'bookmark) -(defcustom xwidget-webkit-scroll-behavior 'native - "Scrolling behavior of the webkit instance. -The possible values are: `native' or `image'." - :version "25.1" - :group 'frames ; TODO add xwidgets group if more options are added - :type '(choice (const native) (const image))) - (declare-function make-xwidget "xwidget.c" (type title width height arguments &optional buffer)) (declare-function xwidget-set-adjustment "xwidget.c" @@ -141,40 +134,24 @@ xwidget-webkit-mode-map "Keymap for `xwidget-webkit-mode'.") (defun xwidget-webkit-scroll-up () - "Scroll webkit up. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit up." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) - (image-scroll-up))) + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)) (defun xwidget-webkit-scroll-down () - "Scroll webkit down. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit down." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) - (image-scroll-down))) + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)) (defun xwidget-webkit-scroll-forward () - "Scroll webkit forwards. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit forwards." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) - (xwidget-webkit-scroll-forward))) ; FIXME infloop! + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)) (defun xwidget-webkit-scroll-backward () - "Scroll webkit backwards. -Depending on the value of `xwidget-webkit-scroll-behavior', -this scrolls in `native' fashion, or like `image-mode' would." + "Scroll webkit backwards." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) - (xwidget-webkit-scroll-backward))) ; FIXME infloop! + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)) ;; The xwidget event needs to go into a higher level handler @@ -417,9 +394,7 @@ xwidget-webkit-adjust-size-to-content (defun xwidget-webkit-adjust-size-dispatch () "Adjust size according to mode." (interactive) - (if (eq xwidget-webkit-scroll-behavior 'native) - (xwidget-webkit-adjust-size-to-window) - (xwidget-webkit-adjust-size-to-content)) + (xwidget-webkit-adjust-size-to-window) ;; The recenter is intended to correct a visual glitch. ;; It errors out if the buffer isn't visible, but then we don't get ;; the glitch, so silence errors. -- 2.7.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-05-08 0:21 ` Paul Eggert @ 2016-05-13 8:05 ` joakim 2016-05-13 16:53 ` Paul Eggert 0 siblings, 1 reply; 7+ messages in thread From: joakim @ 2016-05-13 8:05 UTC (permalink / raw) To: Paul Eggert; +Cc: 22465 Paul Eggert <eggert@cs.ucla.edu> writes: > joakim@verona.se wrote: >> Perhaps someone still prefers the 'image method though. > > This seems unlikely, given that it recurses infinitely whenever it scrolls left > or right. Anyway, thanks for following up. If nobody objects I would like to > install the attached patch to emacs-25 to remove xwidget-webkit-scroll-behavior > and therefore fix the bug. I agree, please install this fix. > > From 58b7ecc4bcba46c775a7edca209587f034185861 Mon Sep 17 00:00:00 2001 > From: Paul Eggert <eggert@cs.ucla.edu> > Date: Sat, 7 May 2016 17:17:55 -0700 > Subject: [PATCH] Remove buggy non-native image scrolling > > This never worked, and could cause infinite recursion. > Problem reported by Glenn Morris (Bug#22465). > * lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove. > All uses removed. > --- > lisp/xwidget.el | 43 +++++++++---------------------------------- > 1 file changed, 9 insertions(+), 34 deletions(-) > > diff --git a/lisp/xwidget.el b/lisp/xwidget.el > index 19f631f..7a0ca8b 100644 > --- a/lisp/xwidget.el > +++ b/lisp/xwidget.el > @@ -34,13 +34,6 @@ > (require 'cl-lib) > (require 'bookmark) > > -(defcustom xwidget-webkit-scroll-behavior 'native > - "Scrolling behavior of the webkit instance. > -The possible values are: `native' or `image'." > - :version "25.1" > - :group 'frames ; TODO add xwidgets group if more options are added > - :type '(choice (const native) (const image))) > - > (declare-function make-xwidget "xwidget.c" > (type title width height arguments &optional buffer)) > (declare-function xwidget-set-adjustment "xwidget.c" > @@ -141,40 +134,24 @@ xwidget-webkit-mode-map > "Keymap for `xwidget-webkit-mode'.") > > (defun xwidget-webkit-scroll-up () > - "Scroll webkit up. > -Depending on the value of `xwidget-webkit-scroll-behavior', > -this scrolls in `native' fashion, or like `image-mode' would." > + "Scroll webkit up." > (interactive) > - (if (eq xwidget-webkit-scroll-behavior 'native) > - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) > - (image-scroll-up))) > + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)) > > (defun xwidget-webkit-scroll-down () > - "Scroll webkit down. > -Depending on the value of `xwidget-webkit-scroll-behavior', > -this scrolls in `native' fashion, or like `image-mode' would." > + "Scroll webkit down." > (interactive) > - (if (eq xwidget-webkit-scroll-behavior 'native) > - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) > - (image-scroll-down))) > + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)) > > (defun xwidget-webkit-scroll-forward () > - "Scroll webkit forwards. > -Depending on the value of `xwidget-webkit-scroll-behavior', > -this scrolls in `native' fashion, or like `image-mode' would." > + "Scroll webkit forwards." > (interactive) > - (if (eq xwidget-webkit-scroll-behavior 'native) > - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) > - (xwidget-webkit-scroll-forward))) ; FIXME infloop! > + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)) > > (defun xwidget-webkit-scroll-backward () > - "Scroll webkit backwards. > -Depending on the value of `xwidget-webkit-scroll-behavior', > -this scrolls in `native' fashion, or like `image-mode' would." > + "Scroll webkit backwards." > (interactive) > - (if (eq xwidget-webkit-scroll-behavior 'native) > - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) > - (xwidget-webkit-scroll-backward))) ; FIXME infloop! > + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)) > > > ;; The xwidget event needs to go into a higher level handler > @@ -417,9 +394,7 @@ xwidget-webkit-adjust-size-to-content > (defun xwidget-webkit-adjust-size-dispatch () > "Adjust size according to mode." > (interactive) > - (if (eq xwidget-webkit-scroll-behavior 'native) > - (xwidget-webkit-adjust-size-to-window) > - (xwidget-webkit-adjust-size-to-content)) > + (xwidget-webkit-adjust-size-to-window) > ;; The recenter is intended to correct a visual glitch. > ;; It errors out if the buffer isn't visible, but then we don't get > ;; the glitch, so silence errors. -- Joakim Verona ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional 2016-05-13 8:05 ` joakim @ 2016-05-13 16:53 ` Paul Eggert 0 siblings, 0 replies; 7+ messages in thread From: Paul Eggert @ 2016-05-13 16:53 UTC (permalink / raw) To: joakim; +Cc: 22465-done On 05/13/2016 01:05 AM, joakim@verona.se wrote: > I agree, please install this fix. Thanks, installed, and closing the bug. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-13 16:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-25 23:19 bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional Glenn Morris 2016-05-06 5:48 ` Paul Eggert 2016-05-06 15:42 ` Glenn Morris 2016-05-06 17:50 ` joakim 2016-05-08 0:21 ` Paul Eggert 2016-05-13 8:05 ` joakim 2016-05-13 16:53 ` Paul Eggert
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.