1

I'm having trouble installing flycheck. I'm on a Mac (see below for details), and I have placed the 3-line code snippet recommneded on the flycheck installation page in my emacs init file. When I start up emacs (note, I don't use GUI, I always use emacs -nw), and then I attempt to install flycheck with M-x package-install RET flycheck I get the following error: Scan error: "Unbalanced parentheses", 888, 3796 I tried both the MELPA-Stable and MELPA versions, but they both yield the same error. Any ideas as to what's causing this error? Many thanks. Mac and emacs details: MacOS 10.15 (19A602) Emacs from https://emacsformacosx.com/  GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02

4
  • 1
    Does your 3-line code snippet contain unbalanced parentheses -- i.e., a missing parenthesis or a missing double quote? [Maybe you copied / pasted and missed an open or close parenthesis ...] You can try opening your .emacs / init.el and type M-x check-parens .... Perhaps your .emacs / init.el contains other errors relating to a missing open / close parenthesis ...
    – lawlist
    Nov 6, 2019 at 0:34
  • Other than @lawlist's good advice, if you don't show us the code causing the error, we can't show you what the problem is. Can you provide an exact recipe for reproducing the error?
    – phils
    Nov 6, 2019 at 2:03
  • @lawlist was correct. Thanks for the suggestion. There was an offending square bracket farther up in my init file that never caused a peep before (that I know of), but was catastrophic when the package manager came into play. Nov 6, 2019 at 2:16
  • @lawlist Please convert your comment into an answer.@ NotSoGiantSequoia: Please accept lawlist's answer by clicking the V-button (it may be that you have to wait a grace period to be able to do so.)
    – Tobias
    Nov 6, 2019 at 5:36

1 Answer 1

2

As indicated in the comments underneath the question by the original poster, the problem turned out to be a missing square bracket in the user-configuration file. The built-in function M-x check-parens is often times very helpful to locate mismatched parentheses in an open buffer; e.g., open up the user-configuration file and use the function check-parens ....

3
  • Could we hook check-parens into flycheck?
    – alper
    Aug 17, 2021 at 15:46
  • @alper -- I have never used flycheck and have no idea when might be an appropriate time/place in the its code to perform check-parens, and a mismatched pair would probably cause the code to stop at that location -- potentially breaking the functionality of flycheck until the error is fixed and flycheck is restarted again ... but I really do not know, sorry ... In one of my usages of checking for mismatched pairs, I generate a message and prevent the error from causing a break/stop in code execution -- but that is beyond the scope of the answer in this thread.
    – lawlist
    Aug 17, 2021 at 16:21
  • The reason I asked it because rainbow or paren-mode does not detect unmatched paranthesis like print(((((("hello") but check-parens does. Please see: emacs.stackexchange.com/questions/68149/…
    – alper
    Aug 17, 2021 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.