all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: immerrr again <immerrr@gmail.com>
To: "Andreas Röhler" <andreas.roehler@online.de>
Cc: Stefan Kangas <stefankangas@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: python.el: improve sexp-based navigation or make it optional?
Date: Sat, 16 May 2020 22:46:13 +0200	[thread overview]
Message-ID: <CAERznn8W693jZr_uWDRufAZT-RtdaBGpC1ndLgGri4G3ERdJog@mail.gmail.com> (raw)
In-Reply-To: <f2aea052-8802-e77d-aae9-7a6445850604@online.de>

On Sat, May 16, 2020 at 9:04 PM Andreas Röhler
<andreas.roehler@online.de> wrote:
>
>
> On 16.05.20 15:16, immerrr again wrote:
> >
> > In absence of such mode, I wonder if it would be a welcome addition to
> > introduce a configuration parameter that at least disables the smart
> > navigation, making sexp skip one symbol or explicitly
> > parenthesized/bracketed expression at a time.
>
> Maybe that does it?: (from python.el)
>
> If you prefer `cc-mode'-like
> ;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
> ;; enough, You can do that using the `python-mode-hook':
>
> ;; (add-hook 'python-mode-hook
> ;;           (lambda () (setq forward-sexp-function nil)))
>

Yep, it works, thanks! I have forgotten about that variable.

I wonder if it would be hard to implement the sexp visualisation mode
that would show "virtual parentheses".

Overlays perhaps would be  a tad slow, if there was a parenthesis pair
shown for every sexp out there. Maybe I could limit it only to the
sexps that immediately surround point...

Properties would be much better performance wise, but looks like
"display" characters are added as a block, and one cannot enter a
sequence of virtual parentheses with point. I could try adding spaces
or whatnot, but then I'd have to be extra careful that they are
cleaned up before saving or copying buffer contents.

Any recommendations on what could be the starting point here?



  reply	other threads:[~2020-05-16 20:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 13:16 python.el: improve sexp-based navigation or make it optional? immerrr again
2020-05-16 14:05 ` Stefan Kangas
2020-05-16 19:11 ` Andreas Röhler
2020-05-16 20:46   ` immerrr again [this message]
2020-05-17 14:12   ` bug#41361: Fwd: " Andreas Röhler
2020-05-20  1:06     ` Stefan Kangas
2020-05-21 13:42       ` João Távora
2021-03-20  2:51         ` Stefan Kangas
2021-07-31 16:44     ` Lars Ingebrigtsen
2020-05-17  3:04 ` Stefan Monnier
2020-05-20  1:06 ` Stefan Kangas

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=CAERznn8W693jZr_uWDRufAZT-RtdaBGpC1ndLgGri4G3ERdJog@mail.gmail.com \
    --to=immerrr@gmail.com \
    --cc=andreas.roehler@online.de \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    /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.