Giter Site home page Giter Site logo

Comments (14)

jeastman avatar jeastman commented on August 19, 2024 1

(I wonder, would this kind of setting not be best as examples in user settings file?)

That is a very good question. It seems to me that every configuration I have ever looked at simply uses the short form and dismisses it with something like "I do not want to be bothered". I think the Emacs maintainers are trying to make the point that any time you are prompted with the "yes or no" question, you should probably take some time to consider the answer. The fact that the use-short-answers variable has finally appeared leads me to believe they are actively thinking about this.

I have a strong suspicion that even if this were made an example user setting, everyone would simply use it without really considering it. The simple desire for convenience is a powerful force. I like the idea of forcing the user to make a conscious decision here, but I don't think it will matter much.

from crafted-emacs.

jeastman avatar jeastman commented on August 19, 2024 1

Best I can gleam from your error message is that the native compiler cannot find the assembler ('as'). Maybe a path issue with your setup? Not sure why it would only have an issue with that particular elisp code.

from crafted-emacs.

jeastman avatar jeastman commented on August 19, 2024 1

Ah... maybe it only triggers when you use fset because it is in native c code. In the other cases, it may not actually invoke the as assembler. You might also check to see if you have as installed. I am not familiar with mingw, but maybe the as assembler is packaged separately?

from crafted-emacs.

jeastman avatar jeastman commented on August 19, 2024

I should note that the docs say:

We recommend against setting this variable non-nil, because yes-or-no-p
is intended to be used when users are expected not to respond too
quickly, but to take their time and perhaps think about the answer.

But I think that warning applies to replacing yes-or-no-p with y-or-n-p as well.

from crafted-emacs.

ajxn avatar ajxn commented on August 19, 2024

I agree about the difference between yes-or-no-p and y-or-n-p. Short is for reversible selections, and the long are for important and non reversible selection.

And I also agree that the selection to make both short has the same short coming, so if one want this, your solution are backward compatible. So I like that, and use that myself.

(I wonder, would this kind of setting not be best as examples in user settings file?)

from crafted-emacs.

jeastman avatar jeastman commented on August 19, 2024

See additional PR #54

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

I'm in such a habit of typing "yes" or "no" that turning that to 'y' or 'n' for me breaks things... weird things happen... I type 'y' the prompt does something, then I get "es" to show up in a buffer... or suddenly my dired sorts differently... So, I personally prefer the longer form. Interesting insight @jeastman , I had not considered it from that perspective.

from crafted-emacs.

daviwil avatar daviwil commented on August 19, 2024

I have the same problem, I'm very used to typing yes in many places. Maybe we could have a section of "suggested settings" in the README to point the user to some things that they might be interested to try? If we make it harder to just copy/paste a whole block of settings then it's possible that they would actually think about whether they want this behavior or not.

As a side note, looking at the docs for use-short-answers pointed me to the read-answers function which is much better for what I was trying to do on stream for prompting the user about pulling updates.

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

Maybe we could have a section of "suggested settings" in the README to point the user to some things that they might be interested to try?

Possibly... not sure what that list might be. Things that generate discussions like this (and electric-pair-mode, line numbers as other examples) might be good candidates. At the same time, I feel like we should probably have documentation on how to set/reset/ignore all the settings we are configuring here, which may imply providing the ways to do such a thing (ala defcustom/defun, or example snippets in example files with pointers in READMEs... perhaps we need a README per module that describes the settings and how to go about customizing them...). Other examples would be the challenges of loading themes, the colors in the default-frame-alist get in the way and need to be removed in order for (some?) themes to work. This was an issue I worked through when trying to load modus-vivendi and still seeing a blue frame instead of black. Removing the doom-modeline-init from the hook, although there is a fantastic approach to solve that on one of the PRs, which also generated a discussion.

In the context of this specific issue though, I couldn't figure out a way to "undo" an fset which is why I made a PR with using advice instead. Advised functions are easily reverted... if you know how advice works, which isn't everybody. I'm okay with the y-or-n-p thing we have as the "recommended" setting since I can now override that in my config.el. The foregoing paragraph is good for discussion, but probably out-of-scope for this particular issue.

from crafted-emacs.

del-quimico avatar del-quimico commented on August 19, 2024

An interesting issue for me using my own compiled windows-nt binary (mingw64) of Emacs 28 is that =fset= as well as the =advice-add= approach result in native compilation error that breaks this configuration, not sure why this is or perhaps my compilation is missing necessary links at runtime? However, using the Emacs 28 variable, =use-short-answers= works without issue.

from crafted-emacs.

jeastman avatar jeastman commented on August 19, 2024

Exactly what compilation error getting? I wonder if is is something which could be solved with a compiler hint of some kind?

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

An interesting issue for me using my own compiled windows-nt binary (mingw64) of Emacs 28 is that =fset= as well as the =advice-add= approach result in native compilation error

Interesting indeed... especially since fset is built in the C source code for emacs. Advising is not an uncommon practice, which possibly could bring the question: does advice work for anything else in your build? Weird... But I'm not a Windows person... I am interested in the compilation error you are getting though. Maybe you could post that and a stacktrace if available?

from crafted-emacs.

del-quimico avatar del-quimico commented on August 19, 2024

Sure.

Here is the output in Emacs "warnings" buffer. I'm not so sure how to do a stack trace on windows. I'm a little rusty, just recently picked back up on using emacs, and coding in general.

Warning (initialization): An error occurred while loading โ€˜c:/Users/erik/.config/emacs/init.elโ€™:

Native compiler error: (lambda (arg21 &optional) (let ((f #'yes-or-no-p)) (funcall f arg21))), Compiling c:/Users/erik/.config/emacs/eln-cache/29.0.50-d2b6da4e/subr--trampoline-7965732d6f722d6e6f2d70_yes_or_no_p_0.eln...
x86_64-w64-mingw32-gcc-11.2.0: fatal error: cannot execute 'as': CreateProcess: No such file or directory
compilation terminated.

Btw, I did not mean to digress the subject of this thread.

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

Closing since #54 was merged and included the use-short-answer suggestion provided here.

from crafted-emacs.

Related Issues (20)

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.