Git Product home page Git Product logo

Comments (9)

Silex avatar Silex commented on August 15, 2024

As far as I know C-c C-r V is not meant to create views but to find existing ones. You are supposed to use the classic C-x C-f to create new files.

That said, maybe this could be improved.

from projectile-rails.

stardiviner avatar stardiviner commented on August 15, 2024

@Silex Yes, actually, I checked the source code and tried to improve it before I asked this issue.
It seems have the code to use find-file. but the condition is a littlle kind of weird. I can't understand what it does. So I hope someone can improve the code.

from projectile-rails.

asok avatar asok commented on August 15, 2024

As far as I know C-c C-r V is not meant to create views but to find existing ones. You are supposed to use > the classic C-x C-f to create new files.

C-c C-r V tries to be smart - if no corresponding files exists it will present the user the list of files in the corredponding dir to choose from. So if you're completion system allows to input a non-existant file and create a new buffer for it it means that C-c C-r V can create new files.

I see the bug I'll try to kill it.

from projectile-rails.

stardiviner avatar stardiviner commented on August 15, 2024

@asok Seems the fix still does not work.
I tested on my Emacs, it will open dired, instead of create a new file. (Maybe I mis-understand? this is the normal behavior?)
I tried to use edebug to debug,
but have not found wrong. And I don't know how to dig deeper.

projectile-rails-find-view-create-new

from projectile-rails.

asok avatar asok commented on August 15, 2024

@stardiviner it will open the dired buffer because your completion system does not allow inputting arbitrary value. Try using ido (setq projectile-completion-system 'ido).
This is far from perfect but I don't know how to solve it. Maybe some message in mini-buffer would be explanatory.

from projectile-rails.

stardiviner avatar stardiviner commented on August 15, 2024

@asok I see, I will open an issue on helm to see whether helm can support inputting arbitrary value feature. Thanks for your improvement.

from projectile-rails.

stardiviner avatar stardiviner commented on August 15, 2024

@asok I found Helm has a source called helm-source-buffer-not-found, I will check it out to see whether can use that.

from projectile-rails.

asok avatar asok commented on August 15, 2024

@stardiviner there is an option to helm :must-match 'confirm option, and projectile is using it. And even if I eval (helm-comp-read "Choose: " '("a" "b") :must-match 'confirm) and then I input "c" and confirm the "c" is returned.
But when I eval (helm-comp-read "Choose: " '("a" "b") :must-match 'confirm :candidates-in-buffer t) an empty string is returned.
This way helm-comp-read is run in projectile. Look here.

from projectile-rails.

stardiviner avatar stardiviner commented on August 15, 2024

I tried to disable :candidates-in-buffer t in projectile-completing-read. projectile-rails still opens dired.

So helm did not support inputting arbitrary value?

from projectile-rails.

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.