Code Monkey home page Code Monkey logo

Comments (14)

flexibeast avatar flexibeast commented on June 3, 2024

So does the file refN.html exist in /usr/share/doc/picolisp/? If not, where is refN.html located on your system?

from plisp-mode.

borgauf avatar borgauf commented on June 3, 2024

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

Are there any HTML docs in that directory? If not, does Ubuntu have a separate package for the Picolisp documentation?

from plisp-mode.

borgauf avatar borgauf commented on June 3, 2024

from plisp-mode.

borgauf avatar borgauf commented on June 3, 2024

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

ElDoc is the caller, as per your original message; it's trying to locate the PicoLisp documentation so that it can be displayed whilst one is editing PicoLisp.

Do you still get the error if you change the value of picolisp-documentation-directory to "/usr/share/doc/picolisp/doc"?

from plisp-mode.

gcentauri avatar gcentauri commented on June 3, 2024

I experienced this error as well after switching some directories around. I was wondering about adding a check so that if the documentation directory isn't found, Eldoc will be toggled off so that this strange behavior doesn't happen. I was quite confused when just navigating through the buffer put me in some strange blank error buffer.

It definitely goes away if the documentation directory can be found (or you toggle off Eldoc mode)

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

@gcentauri: Yeah, i noticed this whilst working on something else, and hadn't yet got around to addressing it - sorry! i've just pushed some changes to handle this; could you please let me know if they work for you?

from plisp-mode.

gcentauri avatar gcentauri commented on June 3, 2024

This does work for me. I got a popup asking if I wanted to turn off eldoc mode. I would consider just automatically turning off eldoc mode (i believe it is buffer local, and won't affect other modes that use it), and then printing the "no documentation directory found, please check the value of the picolisp-documentation-directory variable" message in the minibuffer. Or the other way around, don't turn on Eldoc unless the directory is found.

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

Yeah, answering 'Yes' to the question makes use of the buffer-locality:

(if (y-or-n-p "Documentation not found. Turn off Eldoc mode in this buffer? ")
    (eldoc-mode 0))

picolisp-mode doesn't turn on eldoc-mode itself; as such, it respects the user's existing configuration. (On my system, outside of picolisp-mode, i've enabled global-eldoc-mode, so that eldoc-mode is on by default.) So the "don't turn on Eldoc unless the directory is found" option isn't applicable.

i'd prefer not to disable eldoc-mode without the user getting a very noticeable indication that this has happened. Messages displayed in the echo-area can be very quickly overwritten, such that a user might find Eldoc "not working" without having seen an explanation of why. The popup avoids this, and even if it was just an info popup (e.g. "Unable to find documentation; disabling eldoc-mode"), the user would still have to click a button to clear the popup anyway.

My thought was that the current popup gives the user the option to correct the value of the picolisp-documentation-directory variable, answer "No" to the popup, and then continue with Eldoc now working. However, i can imagine that if one is in a situation where the documentation is never going to be available, having to deal with this popup every time one edits a PicoLisp file would be irritating; are you in that situation?

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

(Well, the popup is modal, so i should have written that the user would answer "No", then correct the value of picolisp-documentation-directory, then go back to working on the source.)

from plisp-mode.

gcentauri avatar gcentauri commented on June 3, 2024

that all makes sense. i was thinking of the situation where it may never be available (which would be pretty uncommon for picolisp, now that i think of it. running with out the docs directory somewhere breaks the pil help functions too). i just didn't like the thought of having to click it for every single picolisp buffer i opened if i happened to be in a situation where i couldn't provide a docs directory.

from plisp-mode.

flexibeast avatar flexibeast commented on June 3, 2024

*nod* Fair enough! i've now added a picolisp-documentation-unavailable defcustom to handle that situation; does that work for you? If so, i think i'll close this issue, and @borgauf can reopen it if the initial problem still isn't resolved for them.

from plisp-mode.

gcentauri avatar gcentauri commented on June 3, 2024

👍

from plisp-mode.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.