Subject: bug#11770: closed (Re: bug#11770: 24.1.50; Unable to mouse-mark regions in the info reader)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 28 Jun 2012 19:15:02 +0000

Your bug report

#11770: 24.1.50; Unable to mouse-mark regions in the info reader

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
11770: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11770
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#11770: 24.1.50; Unable to mouse-mark regions in the info reader
From: Stefan Monnier <[email-masked]>
To: martin rudalics <[email-masked]>
Cc: David Kastrup <[email-masked]>, [email-masked]
Date: Thu, 28 Jun 2012 15:10:22 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

>> 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,

Subject: 24.1.50; Unable to mouse-mark regions in the info reader
From: David Kastrup <[email-masked]>
To: [email-masked]
Date: Sun, 24 Jun 2012 16:42:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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