From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Andrew Pennebaker <andrew.pennebaker@gmail.com>
Cc: michael_heerdegen@web.de, help-gnu-emacs@gnu.org
Subject: Re: hideshow bug with json-mode
Date: Thu, 07 May 2015 21:50:57 +0100 [thread overview]
Message-ID: <87bnhw3ydq.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <CAHXt_SVELSNOtPd3nZ-mpnwWJkHNS7oxkNreUHk5bVxdpVYO8A@mail.gmail.com> (message from Andrew Pennebaker on Thu, 7 May 2015 09:02:55 -0500)
Try evaluating the following line:
(push '(json-mode "{" "}" "/[*/]" nil) hs-special-modes-alist)
Then try your example.
Probably, the reason yafolding works is because it's indentation based.
Hide-show is based on syntax, so it needs information from the mode on
the syntax of blocks.
When you say that nXML mode doesn't work, what do you mean? What XML
code did you use to try it?
BR,
Robert Thorpe
Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
> yafolding <https://github.com/zenozeng/yafolding.el> seems to fix this
> problem for both JSON and XML files.
>
> On Thu, May 7, 2015 at 8:20 AM, Michael Heerdegen <michael_heerdegen@web.de>
> wrote:
>
>> Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
>>
>> > This problem only happens in certain major modes; python-mode with
>> > hs-minor-mode works as expected, whereas json-mode with hs-minor-mode
>> > features this problem.
>>
>> AFAIK hideshow does not work out of the box with every mode. It's
>> possible that it needs configuration to make it work (see
>> `hs-special-modes-alist'). Are you sure that the affected modes are
>> supported?
>>
>>
>> HTH,
>>
>> Michael.
>>
>>
>>
prev parent reply other threads:[~2015-05-07 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 17:37 hideshow bug with json-mode Andrew Pennebaker
2015-05-06 20:45 ` Robert Thorpe
2015-05-07 2:35 ` Andrew Pennebaker
2015-05-07 2:37 ` Andrew Pennebaker
2015-05-07 13:20 ` Michael Heerdegen
2015-05-07 14:02 ` Andrew Pennebaker
2015-05-07 20:50 ` Robert Thorpe [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=87bnhw3ydq.fsf@robertthorpeconsulting.com \
--to=rt@robertthorpeconsulting.com \
--cc=andrew.pennebaker@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/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.