From: Tassilo Horn <tsdh@gnu.org>
To: emacs-devel@gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 34160@debbugs.gnu.org
Subject: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el
Date: Wed, 31 Jul 2019 09:39:00 +0200 [thread overview]
Message-ID: <87ef26ac17.fsf@gnu.org> (raw)
Hi Lars,
when fixing bug#34160 you've reverted my changes that made json pretty
printing use replace-region-contents. That had the major benefit that
pretty printing the JSON object at point didn't move point. I use that
many times a week on large JSON objects using the following command.
--8<---------------cut here---------------start------------->8---
(defun th/json-pretty-print-snippet-at-point (&optional minimize)
"Pretty-print the json snippet at point."
(interactive "P")
(save-excursion
(when-let ((beg (car (nth 9 (syntax-ppss)))))
(goto-char beg)
(forward-sexp)
(when (looking-back "\n" beg)
(backward-char))
(json-pretty-print beg (point) minimize))))
--8<---------------cut here---------------end--------------->8---
AFAICS, the problem in bug#34160 was not caused by my changes (the user
used Emacs 24 and not a 27 snapshot) so I see no justification for
removing my feature.
Could you please reinstall the feature or describe why it is not
feasible to keep it?
Thanks,
Tassilo
next reply other threads:[~2019-07-31 7:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABOyWhcidWYNa+aEqFjtHd4TFrOf3Lx8PUHRy9ZvsCFtNPUJGQ@mail.gmail.com>
2019-07-31 7:39 ` Tassilo Horn [this message]
2019-07-31 15:38 ` bug#34160: About commit bff64115a0ad081282e0f99305f41c8dd1917d67, bug#34160, json.el Eli Zaretskii
2019-07-31 18:40 ` Tassilo Horn
2019-07-31 18:48 ` Eli Zaretskii
2019-07-31 18:41 ` Lars Ingebrigtsen
2019-07-31 19:30 ` Tassilo Horn
2019-07-31 20:21 ` Lars Ingebrigtsen
2019-08-01 4:54 ` Tassilo Horn
2019-08-01 11:11 ` Lars Ingebrigtsen
2019-08-01 12:16 ` Tassilo Horn
2019-08-02 16:16 ` Tassilo Horn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ef26ac17.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=34160@debbugs.gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).