all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* hideshow bug with json-mode
@ 2015-05-06 17:37 Andrew Pennebaker
  2015-05-06 20:45 ` Robert Thorpe
  2015-05-07 13:20 ` Michael Heerdegen
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Pennebaker @ 2015-05-06 17:37 UTC (permalink / raw
  To: Emacs Help

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.

package.json:

{
  "name": "dotfiles",
  "repository": {
    "type": "git"
  }
}

Steps to reproduce:

M-g g 3
M-x hs-toggle-hiding RET

Expected:

{
  "name": "dotfiles",
  "repository": { ... }
}

Observed:

{ ... }

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.

Any suggestions for configuration to work around this problem? I considered
adding advice to automatically go to the end of line before toggling, but
this doesn't work when re-showing the block, as the cursor needs to be on
the brace ({), but before the ellipsis (...).

-- 
Cheers,
Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-07 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.