Giter Site home page Giter Site logo

Comments (4)

jeffbowman avatar jeffbowman commented on August 19, 2024 1

Ok, I think I take it back. This might be a bug. Assume you have a path like this: ~/.config/rational-emacs/ and in that path you add the file foo.el. The regular expression matches rational-emacs/foo.el and assumes you mean this is a rational-emacs module. I need to fix the regular expression. I'll work on it.

My understanding was the regular expression was applied against the file name only, however it seems to include the entire path to the file as part of the file name.

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

Is this the intended behaviour for this skeleton, or is this a bug?

Not a bug. Here is more information:

Autoinsert is on, but there are 2 different skeleton templates for .el files. The first is in the init file for rational-*.el files, there is another built in for all other *.el files.

If you open a brand new emacs lisp file, and it's name matches the rational-.*\.el regular expression, you see the prompt to insert a description for a rational-emacs module. If you open a brand new file which does not match that regular expression, you see the prompt for a "Short description" which is for any other emacs lisp file.

This is the normal behavior when auto-insert-mode is turned on. If you open a brand new file for another programming language (for example C++) you'll see a different prompt and a different insertion (see auto-insert-alist for the list of default templates). Answering n (or no if you are using yes-or-no-p) for the first prompt will abort the auto insert.

If you wish to turn this off, in your rational-config-path/config.el you can use (auto-insert-mode -1).

In Emacs, C-h i d m Autotype RET i autoinserting RET should get you to the info page. Alternatively C-h i d m Autotype RET 5 should do approximately the same thing. You can also find information on the Skeleton Language in that same (AutoType) Info node (C-h i d m Autotype RET 1)

Hope this helps!

from crafted-emacs.

abarocio80 avatar abarocio80 commented on August 19, 2024

Yea, you are right.

But, still it tries to auto-insert the template on any .el file under my ~/.config/rational-emacs/ directory. I don't see why it should do that. I know that it is matching the regexp, but my cuestion is: Why would my personal configuration be treated as a module for rational-emacs?

Here some evidence: https://0x0.st/oK3X.png

from crafted-emacs.

jeffbowman avatar jeffbowman commented on August 19, 2024

@abarocio80 I have pushed a PR to resolve this issue. However, if you want to test it, please pull from my repo.

Thanks for the report!

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.