Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while editing code snippet #361

Closed
rodentrabies opened this issue Sep 4, 2018 · 4 comments
Closed

Error while editing code snippet #361

rodentrabies opened this issue Sep 4, 2018 · 4 comments

Comments

@rodentrabies
Copy link

rodentrabies commented Sep 4, 2018

Expected Behavior

Editing code snippet should be silent.

Actual Behavior

Emacs reports an error in the status line:

Error running timer ‘show-paren-function’: (error "parse-sexp-propertize-function did not move syntax-propertize--done")

Steps to Reproduce

  1. Install markdown-mode with el-get.
  2. Open any *.md file and write a code snippet (in <language>... enclosure).
  3. By this time, on entering newline or any other character, the error should have already been reproduced.

Backtrace

Emacs log:

markdown-syntax-propertize-extend-region: Wrong type argument: number-or-marker-p, nilError during redisplay: (internal--syntax-propertize 324) signaled (wrong-type-argument number-or-marker-p nil)

Error running timer ‘show-paren-function’: (error "parse-sexp-propertize-function did not move syntax-propertize--done")

Error during redisplay: (jit-lock-function 876) signaled (wrong-type-argument number-or-marker-p nil)
user-error: Minibuffer window is not activeError during redisplay: (internal--syntax-propertize 324) signaled (wrong-type-argument number-or-marker-p nil)

Error running timer ‘show-paren-function’: (error "parse-sexp-propertize-function did not move syntax-propertize--done")

Backtrace:

Debugger entered--Lisp error: (error "parse-sexp-propertize-function did not move syntax-propertize--done")
  skip-syntax-forward(" " 328)
  back-to-indentation()
  show-paren--locate-near-paren()
  show-paren--default()
  show-paren-function()
  apply(show-paren-function nil)
  timer-event-handler([t 0 0 125000 t show-paren-function nil idle 0])

With show-paren-mode disabled:

Debugger entered--Lisp error: (error "parse-sexp-propertize-function did not move syntax-propertize--done")
  backward-prefix-chars()
  back-to-indentation()
  current-left-margin()
  move-to-left-margin(nil t)
  #[0 "\302\247\203�\302\304X\204�...."  [nil 874 1 use-hard-newlines 0 10 cl--assertion-failed (eq 10 (char-before)) set-hard-newline-properties beginning-of-line looking-at "[ 	]$" current-left-margin line-end-position move-to-left-margin nil t] 3]()
  self-insert-command(1)
  newline()
  markdown-enter-key()
  funcall-interactively(markdown-enter-key)
  call-interactively(markdown-enter-key nil nil)
  command-execute(markdown-enter-key)

Software Versions

  • Markdown Mode: 20180831.1754, fetched from Git on 2018-09-04 by el-get
  • Emacs: 25.3.2
  • OS: Ubuntu 16.04, Manjaro (latest rolling release).

Update

After manually installing v2.3 the problem disappeared, so this issue may not be of any relevance. Feel free to close it in that case.

@rodentrabies rodentrabies changed the title Error while editing code snippet. Error while editing code snippet Sep 4, 2018
@jrblevin
Copy link
Owner

jrblevin commented Sep 4, 2018

Thanks for this report. However, I wanted to confirm that by "a code snippet in a <language>... enclosure---you mean a GFM (backquote-)fenced code block?

In any case, it sounds like this might be related to #360, which I just committed. I can't reproduce with GFM code blocks after this commit, so could you please retry with the latest Git version?

@rodentrabies
Copy link
Author

Oh, sorry, I forgot to quote '```' in '```<language> ... ```', so it was unclear.

@rodentrabies
Copy link
Author

Can confirm, that after #360, this issue does not reproduce, but there's still one problem with master version: aforementioned code snippets do not have different (slightly lighter) face background, which I liked a lot about this mode:)

Still, thanks a lot for the fix. I'm closing this.

@jrblevin
Copy link
Owner

jrblevin commented Sep 5, 2018

Thanks for following up and confirming!

I also really liked the lighter background, but some people really disliked it and it was also difficult to reliably determine the background color programmatically in a way that would work when people switched themes (see #241, #250, and #273, possibly others). In the end, I disabled the automatic background color in favor of letting themes define the color on a case-by-case basis. You can still customize markdown-code-face to make the background lighter if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants