Comments (14)
(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.
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.
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.
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.
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.
See additional PR #54
from crafted-emacs.
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.
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.
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.
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.
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.
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.
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.
Closing since #54 was merged and included the use-short-answer
suggestion provided here.
from crafted-emacs.
Related Issues (20)
- [craftedv2beta] Broken configuration guards (Tracking Issue) HOT 4
- [craftedv2beta] Improve documentation for using straight.el HOT 7
- Provide option for easier module loading. HOT 7
- [craftedv2beta] Use `customize-save-variable` vs. `customize-set-variable`? HOT 11
- [craftedv2beta] Question regarding the skeleton for new modules HOT 5
- Discussion: When do our own `defcustom` variables make sense? When are they best avoided? HOT 6
- [craftedv2beta] Evil bindings in crafted-speedbar are duplicate and inconsistent with evil-collection HOT 3
- [craftedv2beta] Standardized way for naming functions HOT 5
- [craftedv2beta] Unused function `crafted-completion/minibuffer-backward-kill` HOT 2
- texinfo tags in doc headings don't seem to be needed HOT 3
- [v2] Emacs 29+ check for executable prevents Treesitter setup HOT 12
- [v2] No easy way to opt out of tree sitter parsers HOT 5
- [v2] Corfu + Eglot have unsuitable performance for medium/large projects HOT 4
- [v2] defgroup crafted-startup not functioning properly
- [v2]package-selected-packages "Combobulate" problem. HOT 3
- Automating regeneration of Info file HOT 13
- Suggestion: Make examples loadable HOT 3
- Symbol's function definition is void: treesit-auto-add-to-auto-mode-alist HOT 3
- `crafted-init-config` automatically finding directory possibly confounded by submodule use HOT 9
- Eglot doesn't automatically load when a relevant mode is visited until explicitly required HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crafted-emacs.