GNU bug report logs - #11770
24.1.50; Unable to mouse-mark regions in the info reader

Previous Next

Package: emacs;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Sun, 24 Jun 2012 14:47:01 UTC

Severity: normal

Found in version 24.1.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11770 in the body.
You can then email your comments to 11770 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11770; Package emacs. (Sun, 24 Jun 2012 14:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Kastrup <dak <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 Jun 2012 14:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; Unable to mouse-mark regions in the info reader
Date: Sun, 24 Jun 2012 16:42:38 +0200
When marking stuff in an info file via double click, I often get a
backtrace like the following:

Debugger entered--Lisp error: (args-out-of-range 1 262195)
  buffer-substring-no-properties(1 262195)
  pop-mark()
  mouse-drag-track((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))) t)
  mouse-drag-region((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))))
  call-interactively(mouse-drag-region nil nil)


It does not seem to happen at the beginning of the info file, but is
rather common at the end of large info files (like in "(emacs) Bugs").


In GNU Emacs 24.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-22 on lola
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Configured using:
 `configure '--without-toolkit-scroll-bars''

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Message

Minor modes in effect:
  auto-fill-function: message-do-auto-fill
  shell-dirtrack-mode: t
  gnus-message-citation-mode: t
  mml-mode: t
  TeX-PDF-mode: t
  desktop-save-mode: t
  minibuffer-electric-default-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)
  abbrev-mode: t

Recent input:
t u a l l y SPC u s i n g . M-q SPC SPC I t SPC r e 
m e <backspace> a i n s SPC y o u r SPC o w n SPC r 
e s p o n s i b i l i t y SPC t o SPC c o n s u l t 
SPC t h e SPC a c t u a l SPC d o c u m e n t a t i 
o n SPC d e l i v e r e d SPC w i t h SPC y o u r SPC 
v e r s i o n SPC o f SPC L i l y P o n d SPC <backspace> 
. M-q <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> SPC SPC <backspace> <backspace> 
<return> <return> U s <backspace> <backspace> C-h i 
g ( l i <backspace> <backspace> <backspace> C-g i s 
t r i n g SPC r <backspace> t u n <tab> <backspace> 
<backspace> <backspace> <backspace> t u i n <backspace> 
<backspace> n <tab> <return> SPC <down-mouse-5> <mouse-5> 
<down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> 
<triple-down-mouse-1> <triple-mouse-1> <help-echo> 
<help-echo> q M-x e n a s <backspace> <backspace> <backspace> 
m a c s - b u g <return> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> r e p o r t - e m a c s - b u g <retur
n>

Load-path shadows:
None found.

Features:
(shadow emacsbug debug reftex-parse sendmail gnus-dup woman man
jka-compr help-mode view rect shr-color color shr browse-url canlock
multi-isearch shell pcomplete flow-fill mule-util sort smiley gnus-cite
mail-extr gnus-bcklg qp gnus-async parse-time gnus-ml disp-table pop3
nndraft nnmh netrc gnutls network-stream auth-source eieio starttls tls
nnml nnfolder nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime
password-cache dig mailcap nntp gnus-cache gnus-sum nnoo gnus-group
gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range
gnus-win message format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader dired-x dired make-mode latexenc sh-script smie
executable preview prv-emacs byte-opt warnings reftex-vcr reftex-dcr
reftex-auc reftex reftex-vars tex-bar toolbar-x noutline outline
font-latex bytecomp byte-compile cconv latex easy-mmode edmacro kmacro
tex-style python rx longlines cl-macs info cc-langs cl macroexp cl-lib
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs tex-buf tex-info texinfo tex vc-git scheme lilypond-mode
compile comint ansi-color ring easymenu advice help-fns advice-preload
desktop minibuf-eldef gnus gnus-ems nnheader gnus-util mail-utils
mm-util mail-prsvr wid-edit cus-start cus-load preview-latex tex-site
auto-loads server time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-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 loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
David Kastrup




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11770; Package emacs. (Sun, 24 Jun 2012 18:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 11770 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: David Kastrup <dak <at> gnu.org>
Cc: 11770 <at> debbugs.gnu.org
Subject: Re: bug#11770: 24.1.50; Unable to mouse-mark regions in the info
	reader
Date: Sun, 24 Jun 2012 20:00:39 +0200
> When marking stuff in an info file via double click, I often get a
> backtrace like the following:
> 
> Debugger entered--Lisp error: (args-out-of-range 1 262195)
>   buffer-substring-no-properties(1 262195)
>   pop-mark()
>   mouse-drag-track((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))) t)
>   mouse-drag-region((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))))
>   call-interactively(mouse-drag-region nil nil)
> 
> 
> It does not seem to happen at the beginning of the info file, but is
> rather common at the end of large info files (like in "(emacs) Bugs").
> 

I remember reporting something similar in

http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00399.html

martin





Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Thu, 28 Jun 2012 19:15:02 GMT) Full text and rfc822 format available.

Notification sent to David Kastrup <dak <at> gnu.org>:
bug acknowledged by developer. (Thu, 28 Jun 2012 19:15:02 GMT) Full text and rfc822 format available.

Message #13 received at 11770-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: martin rudalics <rudalics <at> gmx.at>
Cc: David Kastrup <dak <at> gnu.org>, 11770-done <at> debbugs.gnu.org
Subject: Re: bug#11770: 24.1.50;
	Unable to mouse-mark regions in the info reader
Date: Thu, 28 Jun 2012 15:10:22 -0400
>> When marking stuff in an info file via double click, I often get a
>> backtrace like the following:
>> 
>> Debugger entered--Lisp error: (args-out-of-range 1 262195)
>> buffer-substring-no-properties(1 262195)
>> pop-mark()
>> mouse-drag-track((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))) t)
>> mouse-drag-region((down-mouse-1 (#<window 3 on *info*> 262195 (10 . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))))
>> call-interactively(mouse-drag-region nil nil)
>> 
>> 
>> It does not seem to happen at the beginning of the info file, but is
>> rather common at the end of large info files (like in "(emacs) Bugs").
>> 

> I remember reporting something similar in

> http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00399.html

I installed the patch below which should fix this problem.


        Stefan


--- src/editfns.c	2012-06-22 21:17:42 +0000
+++ src/editfns.c	2012-06-28 19:07:10 +0000
@@ -283,8 +283,12 @@
     error ("The mark is not set now, so there is no region");
 
   if ((PT < XFASTINT (m)) == (beginningp != 0))
-    m = make_number (PT);
-  return m;
+    return make_number (PT);
+  else
+    { /* Clip to the current narrowing (bug#11770).  */
+      ptrdiff_t mark = XFASTINT (m);
+      return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : m);
+    }
 }
 
 DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,





Message #14 received at 11770-done <at> debbugs.gnu.org (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: martin rudalics <rudalics <at> gmx.at>, 11770-done <at> debbugs.gnu.org
Subject: Re: bug#11770: 24.1.50;
	Unable to mouse-mark regions in the info reader
Date: Thu, 28 Jun 2012 21:41:04 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>>> When marking stuff in an info file via double click, I often get a
>>> backtrace like the following:
>>> 
>>> Debugger entered--Lisp error: (args-out-of-range 1 262195)
>>> buffer-substring-no-properties(1 262195)
>>> pop-mark()
>>> mouse-drag-track((down-mouse-1 (#<window 3 on *info*> 262195 (10
>>> . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))) t)
>>> mouse-drag-region((down-mouse-1 (#<window 3 on *info*> 262195 (10
>>> . 308) 26997248 nil 262195 (1 . 14) nil (3 . 6) (7 . 15))))
>>> call-interactively(mouse-drag-region nil nil)
>>> 
>>> 
>>> It does not seem to happen at the beginning of the info file, but is
>>> rather common at the end of large info files (like in "(emacs) Bugs").
>>> 
>
>> I remember reporting something similar in
>
>> http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00399.html
>
> I installed the patch below which should fix this problem.
>
>
>         Stefan
>
>
> --- src/editfns.c	2012-06-22 21:17:42 +0000
> +++ src/editfns.c	2012-06-28 19:07:10 +0000
> @@ -283,8 +283,12 @@
>      error ("The mark is not set now, so there is no region");
>  
>    if ((PT < XFASTINT (m)) == (beginningp != 0))
> -    m = make_number (PT);
> -  return m;
> +    return make_number (PT);
> +  else
> +    { /* Clip to the current narrowing (bug#11770).  */
> +      ptrdiff_t mark = XFASTINT (m);
> +      return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : m);
> +    }
>  }
>  
>  DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,

I am somewhat skeptical that this is the right fix: the problem occured
whenever trying to mark some region for copying.  There is no good
reason this should venture outside of a narrowed region, so the fix,
while avoiding to trigger an error, is likely to leave the wrong region
marked.

Anyway, I'll check soonish.

-- 
David Kastrup




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Jul 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.