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

(sx-ask) funcall-interactively: Text is read-only #341

Open
shackra opened this issue Jan 28, 2018 · 15 comments
Open

(sx-ask) funcall-interactively: Text is read-only #341

shackra opened this issue Jan 28, 2018 · 15 comments
Assignees
Labels

Comments

@shackra
Copy link

shackra commented Jan 28, 2018

When trying to write a question (sx-ask), I cannot type nor insert tags to the question due to an unknown issue when writing anywhere in the buffer, in the *Messages* buffer I get:

funcall-interactively: Text is read-only

But whatever is going on is beyond me. This is my sx configuration:

  (use-package sx
    :defer 10)

Basically nothing.

@vermiculus vermiculus self-assigned this Jan 28, 2018
@vermiculus
Copy link
Owner

Can you provide the backtrace given when debug-on-error is on? (M-x toggle-debug-on-error)

@shackra
Copy link
Author

shackra commented Jan 28, 2018

None is issued by Emacs, I toggle it and then reproduce the bug but no trace back is reported, just another message funcall-interactively: Text is read-only in Messages buffer appears and that's all.

@vermiculus
Copy link
Owner

Funky. I'll see what I can find out.

This project has seen something of a renewed interest from the community, so I'm hoping to revive the codebase soon with the practices I've learned from my work on magithub. I need to be careful though to not bite off more than I can chew :-)

@vermiculus vermiculus added the bug label Jan 28, 2018
@stardiviner
Copy link

I got same issue too. When I [M-x sx-ask] + emacs. Then sx.el popup a sx-compose-mode buffer, when I want to start typing text after Title: But it reports text is read-only. Even I toggle debug-on-error, still nothing error stack backtrack.

@stardiviner
Copy link

But I typing text in the body area.

@ylluminarious
Copy link
Contributor

@vermiculus The problem seems to exist with the definition of sx-compose--question-headers:

(defconst sx-compose--question-headers
  (concat
   #("Title: " 0 7 (intangible t read-only t rear-nonsticky t))
   "%s"
   #("\n" 0 1 (read-only t))
   #("Tags : " 0 7 (read-only t intangible t rear-nonsticky t))
   "%s"
   #("\n" 0 1 (read-only t rear-nonsticky t))
   #("________________________________________\n"
     0 41 (read-only t rear-nonsticky t intangible t
                     sx-compose-separator t))
   "\n")
  "Headers inserted when composing a new question.
Used by `sx-compose-create'.")

It seems that all of the headers have everything marked as read-only. So nothing can be typed anywhere, except in the body area. This should be fairly easy to fix by more carefully placing the read-only property.

@julienJean99
Copy link

hi, just discovered your package and it looks great but this bug is kind of a shame is there any fix local correction?

@ghost
Copy link

ghost commented Apr 9, 2019

Hello,

quite astonishing that this bug still isn't fixed. What's the use of the package if you can't ask questions? Anyway, I changed all read-only ts in sx-compose--question-headers to read-only nil and now it seems to work - almost. My first test question on stackoverflow was missing the first line of text?!??

--- sx-compose-original.el	2019-04-09 14:48:14.160052111 +0200
+++ sx-compose.el	2019-04-09 15:06:06.732226034 +0200
@@ -70,14 +70,14 @@
 
 (defconst sx-compose--question-headers
   (concat
-   #("Title: " 0 7 (intangible t read-only t rear-nonsticky t))
+   #("Title: " 0 7 (intangible t read-only nil rear-nonsticky t))
    "%s"
-   #("\n" 0 1 (read-only t))
-   #("Tags : " 0 7 (read-only t intangible t rear-nonsticky t))
+   #("\n" 0 1 (read-only nil))
+   #("Tags : " 0 7 (read-only nil intangible t rear-nonsticky t))
    "%s"
-   #("\n" 0 1 (read-only t rear-nonsticky t))
+   #("\n" 0 1 (read-only nil rear-nonsticky t))
    #("________________________________________\n"
-     0 41 (read-only t rear-nonsticky t intangible t
+     0 41 (read-only nil rear-nonsticky t intangible t
                      sx-compose-separator t))
    "\n")
   "Headers inserted when composing a new question.

@ylluminarious
Copy link
Contributor

@Osram-Gru You might want to make this into a PR.

@vermiculus
Copy link
Owner

quite astonishing that this bug still isn't fixed. What's the use of the package if you can't ask questions?

The 'astonishing' thing is that I haven't had much use for the SE network in the past few years and thus have not been using this package.

I bet this regression has something to do with the altered text property implementation in a recent major version break of Emacs. TBH, I don't think I've used this since Emacs 24.x.

Please open a PR and I'll review/merge as appropriate.

@ghost
Copy link

ghost commented Apr 10, 2019

Pull request created right now.

@thor314
Copy link

thor314 commented Nov 17, 2021

I'm still running into this bug. Reinstalled sx from latest on MELPA. IT looks like that pull never got merged.

@vermiculus
Copy link
Owner

I sadly have not had as much time for extra-curriculars as I once had. If someone would like to revamp the PR such that it passes tests (with the understanding that it's not unlikely the tests themselves are broken), I can look at merging whatever changes make sense to folks.

@madorian
Copy link

I still see this bug today. This never made it into the branch?;) There's no way to ask questions on SX with this package? Just asking;)

@x0xntor33alx0x
Copy link

x0xntor33alx0x commented Jun 24, 2023

you can use this

(defconst sx-compose--question-headers
  (concat
   #("Title:  " 0 7 (intangible t read-only t rear-nonsticky t))
   "%s"
   #("\n" 0 1 (read-only t))
   #("Tags :  " 0 7 (read-only t intangible t rear-nonsticky t))
   "%s"
   #("\n" 0 1 (read-only  t rear-nonsticky t))
   #("________________________________________\n"
     0 41 (read-only t rear-nonsticky t intangible t
                     sx-compose-separator t))
   "\n")
  "Headers inserted when composing a new question.
Used by `sx-compose-create'.")

just added a space as a work around in Tags and Title, works for me so far.

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

Successfully merging a pull request may close this issue.

8 participants