help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hideshow bug with json-mode


From: Andrew Pennebaker
Subject: Re: hideshow bug with json-mode
Date: Wed, 6 May 2015 21:37:54 -0500

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 <andrew.pennebaker@gmail.com> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]