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:35:07 -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 1430966125 10157 80.91.229.3 (7 May 2015 02:35:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 02:35:25 +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:35:24 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 1YqBej-0006tb-4u for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 04:35:21 +0200 Original-Received: from localhost ([::1]:47833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBeh-0002G7-TC for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2015 22:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBeX-0002G0-Ik for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqBeW-0002yB-Di for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:35:09 -0400 Original-Received: from mail-ob0-x22f.google.com ([2607:f8b0:4003:c01::22f]:33123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqBeW-0002xk-68 for help-gnu-emacs@gnu.org; Wed, 06 May 2015 22:35:08 -0400 Original-Received: by obblk2 with SMTP id lk2so21728202obb.0 for ; Wed, 06 May 2015 19:35:07 -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=smEEtiS5PcZr6ReWigTqgoE28zjWVmkC9oj1CabKNsM=; b=f7ZVx6RzcrSp5ktoPTEQd4VK3OyLzDP5STA8mjj+oqriLeUOhrvpDUI7pXc2Pqz95Y R6PY2ImwBHJMNAm7jGrjo89sCFunKAtp3H7wb3TZt+4ROeHZVE6DjY/ppDVN3rZU5PHe X8SczSDiG2ZbTn9I1dWx+ZoQNQ28qxC0zJpuysTdAaBasa5rI+is8tYPg02hNz+H/TQk o3agiI89JQJ0SAAkc1vaVwfB1+KiEqf0c0CDginz5FsdIMNnppk6rUTLe6XLynaoban4 T9g2t8aIJAhNJABAkhaUAAfocJrb58T5m084SutlXxaA6G+tfmYPxY8CaUTdNHKouyW9 enSA== X-Received: by 10.60.129.198 with SMTP id ny6mr1473630oeb.22.1430966107448; Wed, 06 May 2015 19:35:07 -0700 (PDT) Original-Received: by 10.76.125.169 with HTTP; Wed, 6 May 2015 19:35:07 -0700 (PDT) In-Reply-To: <87lhh1306p.fsf@robertthorpeconsulting.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22f 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:104255 Archived-At: 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 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