Code Monkey home page Code Monkey logo

Comments (4)

jrblevin avatar jrblevin commented on August 16, 2024

I used to do something similar: My Deft files were all .txt files and so I had deft-text-mode set to markdown-mode. Otherwise, .txt files aren't special and just open in text-mode. With the new deft-extensions approach, I now accomplish this using an auto-mode-alist entry specifically for .txt files in my deft-directory (e.g., ~/deft/):

(add-to-list 'auto-mode-alist '("/deft/.*\\.txt\\'" . markdown-mode))

It seems like you could you do something similar with your special minor mode?

from deft.

pobocks avatar pobocks commented on August 16, 2024

That worked! Don't know why I didn't think of that ;-)

Thanks!

On Thu, Jun 18, 2015 at 11:24 PM, Jason Blevins [email protected]
wrote:

I used to do something similar: My Deft files were all .txt files and so I
had deft-text-mode set to markdown-mode. Otherwise, .txt files aren't
special and just open in text-mode. With the new deft-extensions
approach, I now accomplish this using an auto-mode-alist entry
specifically for .txt files in my deft-directory (e.g., ~/deft/):

(add-to-list 'auto-mode-alist '("/deft/.*.txt'" . markdown-mode))

It seems like you could you do something similar with your special minor
mode?

β€”
Reply to this email directly or view it on GitHub
#4 (comment).

from deft.

jrblevin avatar jrblevin commented on August 16, 2024

Yes, well, I didn't think of it at first either, which is how deft-text-mode came to exist in the first place. I'm happy to retire it now after realizing that it was duplicating functionality. Happy to hear that worked.

from deft.

gnowoel avatar gnowoel commented on August 16, 2024

Brilliant. Adding an auto-mode-alist entry is even better than the original deft-text-mode option, because the major mode for a note would always be consistent, no matter deft-mode is enabled or not.

from deft.

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.