all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: martin rudalics <rudalics@gmx.at>
Cc: David Kastrup <dak@gnu.org>, 11770-done@debbugs.gnu.org
Subject: bug#11770: 24.1.50; Unable to mouse-mark regions in the info reader
Date: Thu, 28 Jun 2012 15:10:22 -0400	[thread overview]
Message-ID: <jwvr4szqmme.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4FE755C7.3090508@gmx.at> (martin rudalics's message of "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

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,






      reply	other threads:[~2012-06-28 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-24 14:42 bug#11770: 24.1.50; Unable to mouse-mark regions in the info reader David Kastrup
2012-06-24 18:00 ` martin rudalics
2012-06-28 19:10   ` Stefan Monnier [this message]

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

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

  git send-email \
    --in-reply-to=jwvr4szqmme.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=11770-done@debbugs.gnu.org \
    --cc=dak@gnu.org \
    --cc=rudalics@gmx.at \
    /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 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.