unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: John Mastro <john.b.mastro@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Cc: Don Woods <don@icynic.com>
Subject: Re: cannot disable paren matching
Date: Tue, 27 Dec 2016 13:30:24 -0800	[thread overview]
Message-ID: <CAOj2CQT-HYO3=FAwd0obCjpu30ZO8g5GJUm7ggA7Z=CmT6SC0Q@mail.gmail.com> (raw)
In-Reply-To: <201612272029.uBRKTl39040819@home.icynic.com>

Don Woods <don@icynic.com> wrote:
> I am having a problem where paren matching is not working as desired,
> and I am unable either to turn it off or to make it work correctly.
>
> The specific case where I'm having trouble is in PostScript mode,
> when also in Overwrite mode.  When I type a character that acts as a
> close paren -- such as > or } -- the character is inserted instead of
> overwriting the current char.  Emacs briefly highlights the matching
> open paren, or reports a mismatch, as the case may be, but does NOT
> remove the char I was intending to overwrite.
>
> Since I don't especially need the paren highlighting in my current
> editing, most of my attempts to work around this bug have involved
> trying to disable the paren-matching behavior.  I have tried such
> things as
>
> (show-paren-mode 0)     ;; no noticeable change
>
> (show-paren-mode nil)   ;; no longer shows matching open
>                         ;; but still does not overwrite
>
> (modify-syntax-entry ?> "w" ps-mode-syntax-table)
>                         ;; > now highlights the char AFTER the matching <
>                         ;; but still does not overwrite
> (modify-syntax-entry ?< "w" ps-mode-syntax-table)
>                         ;; when combined with previous, > goes back to
>                         ;; showing matching <, but still does not overwrite
>
> I know I've tinkered with other paren-related vars without success,
> but no longer recall everything I tried.
>
> My only successful workaround so far is to scrap postscript-mode and
> use fundamental-mode.  I'm using overwrite-mode while editing a portion
> of the PostScript file that is a block of "ascii art" data, so don't
> really need postscript-mode there, but it's awkward when switching
> between the data and code portions of the file.
>
> Note: emacs-version is:
> "GNU Emacs 22.1.1 (mac-apple-darwin)
>  of 2016-04-22 on osx143.apple.com"

I'm not totally sure I understand the scenario, but I tried to reproduce
this in Emacs 25 using the steps below and everything seemed to work as
intended. Specifically, at the end of the steps, the buffer contained
"a{b}c{d}".

Here are the steps I tried:
  emacs -Q
  C-x b ps RET
  M-x ps-mode RET
  M-x show-paren-mode RET
  M-x overwrite-mode RET
  foo{bar}
  C-a
  a{b}c{d}

If my recipe above would indeed trigger the problem you're describing,
perhaps using a newer version of Emacs would do the trick - Emacs 22 is
quite old (circa 2006 I believe).

If the recipe above does not capture the problem, can you provide
similar steps from "emacs -Q" that we can experiment with?

        John



  parent reply	other threads:[~2016-12-27 21:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 20:29 cannot disable paren matching Don Woods
2016-12-27 21:23 ` Skip Montanaro
2016-12-27 21:30 ` John Mastro [this message]
2016-12-27 21:52   ` John Mastro
2016-12-27 22:35     ` Don Woods
2016-12-27 21:36 ` Stefan Monnier
2016-12-27 22:42 ` Konstantin Shakhnov
2016-12-27 23:05   ` John Mastro
2016-12-27 23:14     ` Stefan Monnier
2016-12-28  0:46     ` Don Woods
  -- strict thread matches above, loose matches on Subject: below --
2016-12-27 23:18 martin rudalics

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='CAOj2CQT-HYO3=FAwd0obCjpu30ZO8g5GJUm7ggA7Z=CmT6SC0Q@mail.gmail.com' \
    --to=john.b.mastro@gmail.com \
    --cc=don@icynic.com \
    --cc=help-gnu-emacs@gnu.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.
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).