From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Pennebaker Newsgroups: gmane.emacs.help Subject: Re: hideshow bug with json-mode Date: Wed, 6 May 2015 21:37:54 -0500 Message-ID: References: <87lhh1306p.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430966288 12284 80.91.229.3 (7 May 2015 02:38:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 02:38:08 +0000 (UTC) Cc: Emacs Help To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 07 04:38:08 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqBhQ-0008TB-7G for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 04:38:08 +0200 Original-Received: from localhost ([::1]:47835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBhP-0002u6-2o for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2015 22:38:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBhE-0002tl-5K for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:37:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqBhC-00042x-T2 for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:37:56 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:36253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBhC-00042r-MS for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:37:54 -0400 Original-Received: by oift201 with SMTP id t201so23121592oif.3 for ; Wed, 06 May 2015 19:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ll7alROKkVGOpsn7lC9zLd35WGECtUI2AAOpYEHnTt0=; b=KvCcVKPgqOhNPrnzULL00lmL8e5hic6b+Tffl85DGg5Osoqlyn4boofygjbPu4C/y9 Gn7WMYI0tj6cHH5b02PbByiA9mSTTeLOdaphYIWVTLzgL+9wOkYLe7FrA8wkbHp6oTNM QRsl/PJmCbKTSaBhEbBe4F2w8nY67ZPiGHrZVmKsD0xKyYgRTZVLV56Wj3vKd3Mh/Cdo BZyVXjXkKdXb7Q2OBU8p/L7tD/xe0NzHiQxTPPd/WsyRiL9+VbKaVT0lFbrSPzsLXaoB mCGpNTovERa0N+43h+8H1PrqXV8WppHZK+YwnCLqerzPBqwPJDVBbzoNVvyP8bepFjOm t/2g== X-Received: by 10.202.64.195 with SMTP id n186mr1347850oia.53.1430966274244; Wed, 06 May 2015 19:37:54 -0700 (PDT) Original-Received: by 10.76.125.169 with HTTP; Wed, 6 May 2015 19:37:54 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22c X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104256 Archived-At: I observe the problem even with emacs -Q. The problem presents itself in json-mode and nxml-mode, too! On Wed, May 6, 2015 at 9:35 PM, Andrew Pennebaker < andrew.pennebaker@gmail.com> wrote: > Odd, I'm using the latest version of json-mode and still observing the > problem. I'll file a bug. > > I wonder if I'm not describing the test case clearly enough. Make sure > > * the major-mode is json-mode > * cursor is on line 3, at column 0 or anywhere besides columns 16/17 where > the curly brace lives > * use hs-toggle-hiding > * file contents are: > > { > "name": "dotfiles", > "repository": { > "type": "git" > } > } > > On my machine, toggling on line 3 before the curly brace collapses the > parent like this: > > { ... } > > which gets nasty in a larger JSON document, when all I want collapsed is > this: > > { > "name": "dotfiles", > "repository": { ... } > } > > System: > > $ find $HOME/.emacs.d/.cask -type d -name '*json-mode*' > > /Users/andrew/.emacs.d/.cask/24.4.1/elpa/json-mode-20150413.1948 > > $ emacs --version > > GNU Emacs 24.4.1 > > Copyright (C) 2014 Free Software Foundation, Inc. > > GNU Emacs comes with ABSOLUTELY NO WARRANTY. > > You may redistribute copies of Emacs > > under the terms of the GNU General Public License. > > For more information about these matters, see the file named COPYING. > > On Wed, May 6, 2015 at 3:45 PM, Robert Thorpe < > rt@robertthorpeconsulting.com> wrote: > >> Andrew Pennebaker writes: >> >> > If I don't carefully position my cursor right on the opening curly >> brace, >> > then hideshow toggles the parent block instead of the current line's >> block. >> >> That looks like a bug in json-mode. I think that mode doesn't setup the >> syntax table correctly. >> >> That said, I just downloaded https://github.com/joshwnj/json-mode (I >> assume that's the one you're using) and ran that, and it worked >> correctly. >> >> Have you tried it with emacs -q ? >> >> BR, >> Rob >> > > > > -- > Cheers, > Andrew > -- Cheers, Andrew