Giter Club home page Giter Club logo

Comments (9)

kaushalmodi avatar kaushalmodi commented on August 18, 2024 1

Thanks. You might like the new q binding with this change too ( 2f23f9c ). I made commits in the wrong order.. this commit was made before the above referenced, but it makes more sense in the reverse order.

from eless.

kaushalmodi avatar kaushalmodi commented on August 18, 2024 1

@alphapapa I believe this issue is fixed. Feel free to re-open it if needed.

from eless.

kaushalmodi avatar kaushalmodi commented on August 18, 2024

Strange that you mention that :)

I am specifically disabling view-mode if dired-mode is detected. My main reason for doing that is because the view-mode-map keys shadowed many useful bindings in dired-mode-map. As dired-mode is anyways a special-mode, it is "read-only" by default (i.e. it is not a normal editable file buffer), there is no need to enable view-mode.

I though have a feeling why this question was raised.. hitting q does not seem to behave as a "less" substitute if the mode is dired-mode. I have fixed that in 7a0f741.

(define-key dired-mode-map (kbd "q") (quote save-buffers-kill-emacs))

from eless.

alphapapa avatar alphapapa commented on August 18, 2024

Hm, well, what I mean is, if I'm thinking of eless as a "better less," then when I use it to view a file from its built-in dired mode, I would expect it to view that file in a read-only view mode, not regular Emacs editor mode. :)

I though have a feeling why this question was raised.. hitting q does not seem to behave as a "less" substitute if the mode is dired-mode. I have fixed that in 7a0f741.

That's a good idea.

from eless.

kaushalmodi avatar kaushalmodi commented on August 18, 2024

But the dired-mode is a read-only mode. It becomes "writeable" only when wdired is enabled.

from eless.

alphapapa avatar alphapapa commented on August 18, 2024

Sorry, what I mean is:

  1. User runs eless ., which opens a dired buffer.
  2. User presses RET on a text file (not necessarily txt).
  3. The file is now opened in normal, writable mode. This seems contrary to the purpose of eless, to view files, and to require manual intervention to disable read-only-mode.

from eless.

kaushalmodi avatar kaushalmodi commented on August 18, 2024

Thanks for that explanation..

If I bind RET to dired-view-file (bound to v by default), would that solution work?

from eless.

kaushalmodi avatar kaushalmodi commented on August 18, 2024

Try updating to the latest e5f5363

from eless.

alphapapa avatar alphapapa commented on August 18, 2024

Thanks, that's great.

from eless.

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.