GNU bug report logs - #27192
25.2; c-mode narrow-to-region broken

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,cc-mode; Reported by: Gordon Ross <gordon.w.ross@HIDDEN>; Keywords: moreinfo; dated Fri, 2 Jun 2017 03:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) moreinfo. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27192 <at> debbugs.gnu.org:


Received: (at 27192) by debbugs.gnu.org; 2 Jun 2017 06:31:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 02 02:31:55 2017
Received: from localhost ([127.0.0.1]:50334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGg7n-0001VA-Kt
	for submit <at> debbugs.gnu.org; Fri, 02 Jun 2017 02:31:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40369)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1dGg7l-0001Uy-Om
 for 27192 <at> debbugs.gnu.org; Fri, 02 Jun 2017 02:31:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1dGg7c-0001Eg-Kj
 for 27192 <at> debbugs.gnu.org; Fri, 02 Jun 2017 02:31:48 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38713)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1dGg7c-0001Ec-HF; Fri, 02 Jun 2017 02:31:44 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2991
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1dGg7b-0003Ul-IS; Fri, 02 Jun 2017 02:31:44 -0400
Date: Fri, 02 Jun 2017 09:31:58 +0300
Message-Id: <83fufidhnl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gordon Ross <gordon.w.ross@HIDDEN>
In-reply-to: <CAD0Ztp0-RLoPBDK0+mOAt+v_622b+oHPPKLdADsH1ohEvpPuUg@HIDDEN>
 (message from Gordon Ross on Thu, 1 Jun 2017 21:17:16 -0400)
Subject: Re: bug#27192: 25.2; c-mode narrow-to-region broken
References: <CAD0Ztp0-RLoPBDK0+mOAt+v_622b+oHPPKLdADsH1ohEvpPuUg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 27192
Cc: 27192 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Gordon Ross <gordon.w.ross@HIDDEN>
> Date: Thu, 1 Jun 2017 21:17:16 -0400
> 
> I often use "narrow-to-region" in c-mode when I want to do something
> like replace-string but just within the bounds of one C function or
> (in the example represented in this bug report) the entirety of one
> switch statement starting with switch (expr) { ... ending with }
> 
> After my recent upgrade to emacs 25.2, the TAB "auto-indent" feature
> usually doesn't work in such a narrowed region, briefly showing
> complaints in the minibuffer (See "Args out of range" in messages
> section below) and not indenting.

Please show an example of a buffer where this happens, and tell to
which part to narrow it in order to reproduce the problem.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#27192; Package emacs,cc-mode. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Jun 2017 03:01:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 01 23:01:51 2017
Received: from localhost ([127.0.0.1]:50220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dGcqU-0002fu-JH
	for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 23:01:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36964)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gordon.w.ross@HIDDEN>) id 1dGbDV-0007NS-Ia
 for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 21:17:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gordon.w.ross@HIDDEN>) id 1dGbDP-0006of-0B
 for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 21:17:24 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:60868)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <gordon.w.ross@HIDDEN>)
 id 1dGbDO-0006oZ-SX
 for submit <at> debbugs.gnu.org; Thu, 01 Jun 2017 21:17:22 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56159)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gordon.w.ross@HIDDEN>) id 1dGbDN-00038T-Ag
 for bug-gnu-emacs@HIDDEN; Thu, 01 Jun 2017 21:17:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gordon.w.ross@HIDDEN>) id 1dGbDM-0006n6-0D
 for bug-gnu-emacs@HIDDEN; Thu, 01 Jun 2017 21:17:21 -0400
Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:33188)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <gordon.w.ross@HIDDEN>)
 id 1dGbDL-0006lc-QB
 for bug-gnu-emacs@HIDDEN; Thu, 01 Jun 2017 21:17:19 -0400
Received: by mail-oi0-x22f.google.com with SMTP id w10so74942040oif.0
 for <bug-gnu-emacs@HIDDEN>; Thu, 01 Jun 2017 18:17:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=fWFMaB/tTivARxWMs9ix1pINTRouETmteoQshZU/lHY=;
 b=bQ9EPAULpvx41Fxw88s6Sv/7TdWfKu2B5/9XMtuYQGyVE5yrDubp9Fjl5pAq47Y+dj
 seJdcuX+mjTi9V7IFxE3LQPD/zFv4up/l4wpO0wMQX2xo70O8ISqbycfYeDH4EpihLuk
 XWWtnpWMYJXXP8kifb/cjF6PcSH75n0Dq4VUmma1jRI5Bhy4XemwfT0GVsU3sZMwZNu5
 NaH1WH1rTT1vkBstnbFIBFtMT7A3QxaB7qtt6SamLGvbuqXl0FswTHI+/7GOppD9wCKF
 CFe4rveJysWk7Hlq3Whhd3vZOyYUDzUngcELiHSoMbrQuXVOkYjT1gngcQxgkVExrni0
 jJbw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=fWFMaB/tTivARxWMs9ix1pINTRouETmteoQshZU/lHY=;
 b=IA3o8KftbEEQGX3GqJCS+NM746rPW6uDXdSqA8yxPySy1jDx53orVaQWmyrrC2pyZ9
 2zkIwPokAAg6b7o6XIRI/srez6eInxP8uXBp3j8KhkZH7NMSbsWf+eWgukR2d0L+uK2l
 WsLlxVlUbPNxHN0rwwUhO8jN/IhYajQFnXc5mT2QBEDv97me2TlzdOZ+/aIq9yalcMRw
 v3/OjQ/KDa7ww9PtpGRqYI9t09B3YJuZWoqXFvMONbMZZ3RQFN+lJowmrT9wRRcS8aRM
 RMzWG3Fej3NojuveLAOCbIEF31WUgjYkZDgmDosOW1JXwtdET6exaKR8G6iL0mJAk5WM
 q8vQ==
X-Gm-Message-State: AODbwcAyDCWyl0e6rLG/Jsskp7pzIKb3t/CrsdcRDb0qnxrX57j1orsg
 alr35RKTU7MFYhBDL5uPPnIJeAUx0NKj
X-Received: by 10.202.84.86 with SMTP id i83mr3034374oib.69.1496366237272;
 Thu, 01 Jun 2017 18:17:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.74.25.209 with HTTP; Thu, 1 Jun 2017 18:17:16 -0700 (PDT)
From: Gordon Ross <gordon.w.ross@HIDDEN>
Date: Thu, 1 Jun 2017 21:17:16 -0400
Message-ID: <CAD0Ztp0-RLoPBDK0+mOAt+v_622b+oHPPKLdADsH1ohEvpPuUg@HIDDEN>
Subject: 25.2; c-mode narrow-to-region broken
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 01 Jun 2017 23:01:50 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

I often use "narrow-to-region" in c-mode when I want to do something
like replace-string but just within the bounds of one C function or
(in the example represented in this bug report) the entirety of one
switch statement starting with switch (expr) { ... ending with }

After my recent upgrade to emacs 25.2, the TAB "auto-indent" feature
usually doesn't work in such a narrowed region, briefly showing
complaints in the minibuffer (See "Args out of range" in messages
section below) and not indenting.



In GNU Emacs 25.2.1 (i386-pc-solaris2.11, GTK+ Version 2.24.30)
 of 2017-04-25 built on hipster.openindiana.org
Windowing system distributor 'Project OpenIndiana', version 11.0.11804000
Configured using:
 'configure CC=3D/usr/gcc/4.9/bin/gcc CXX=3D/usr/gcc/4.9/bin/g++
 F77=3D/usr/gcc/4.9/bin/gfortran FC=3D/usr/gcc/4.9/bin/gfortran 'CFLAGS=3D-=
m32
 -O3 ' 'CXXFLAGS=3D -m32' 'FFLAGS=3D -m32' FCFLAGS=3D-m32 'LDFLAGS=3D-m32
 -L/usr/gnu/lib -R/usr/gnu/lib'
 PKG_CONFIG_PATH=3D/usr/lib/pkgconfig/gnutls-3:/usr/lib/pkgconfig
 --prefix=3D/usr --mandir=3D/usr/share/man --bindir=3D/usr/bin
 --libdir=3D/usr/lib --sbindir=3D/usr/sbin --infodir=3D/usr/share/info
 --with-compress-info=3Dno --datarootdir=3D/usr/share --libexecdir=3D/usr/l=
ib
 --with-gif=3Dno ac_cv_sys_long_file_names=3Dyes --with-x-toolkit=3Dgtk2'

Configured features:
XPM JPEG TIFF PNG RSVG IMAGEMAGICK DBUS GCONF GSETTINGS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: C
  value of $LC_CTYPE: C
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: C
  value of $LC_NUMERIC: C
  value of $LC_TIME: C
  value of $LANG: C
  locale-coding-system: nil

Major mode: C/l

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-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: t
  abbrev-mode: t

Recent messages:
Quit
Auto-saving...done
Saving file foo.c...
Wrote foo.c
Making completion list...
Mark set
Quit
c-determine-limit: Args out of range: #<buffer smb_cmn_oplock.c>, 15565, 17=
393
Quit
Type C-x 1 to remove help window.
scroll-down-command: Beginning of buffer
You can run the command =E2=80=98emacs-version=E2=80=99 with M-x em-v RET
GNU Emacs 25.2.1 (i386-pc-solaris2.11, GTK+ Version 2.24.30) of 2017-04-25

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message idna format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode mail-prsvr
mail-utils misearch multi-isearch compare-w vc-git diff-mode easy-mmode
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds dired ls-lisp
cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs pcase cl-lib
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-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 cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded 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 dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 8 129503 30266)
 (symbols 24 22533 0)
 (miscs 20 185 1142)
 (strings 16 23076 7101)
 (string-bytes 1 879457)
 (vectors 8 18343)
 (vector-slots 4 910844 5292)
 (floats 8 181 421)
 (intervals 28 3452 1741)
 (buffers 520 27))




Acknowledgement sent to Gordon Ross <gordon.w.ross@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27192; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 10 Jun 2017 13:00:02 UTC

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