Giter VIP home page Giter VIP logo

Comments (4)

tarsius avatar tarsius commented on August 24, 2024 1

I can reproduce this issue also when using a mode such as text-mode. It appears that the orglink implementation has a bug that the org implementation doesn't have. I noticed that the org implementation has significantly changed since I copied and adjusted it, likely also to fix this bug. I should copy and adjust again to take advantage of the improvements. Doing that might take a little bit longer.

from orglink.

mohkale avatar mohkale commented on August 24, 2024 1

@tarsius

Thanks for looking into the issue. Truth be told while annoying I don't think its a major issue. I checked after installing this plugin but org-link-minor-mode has the same issue and in all my time using it I'd never encountered it before experimenting with this plugin. I think its safe to say this isn't a deal braker, so I'm fine with a wontfix resolution for now. I might send an issue on the mailing list if I encounter it more or run into a similair situation with another plugin.

Once again, thank you.

from orglink.

mohkale avatar mohkale commented on August 24, 2024

Also you can't uncomment (as one would expect, trying to just continually comments the description. :/.

from orglink.

tarsius avatar tarsius commented on August 24, 2024

I have switched to the new code from org but that didn't fix it. (I haven't pushed that yet.)

The problem clearly is that the commenting functionality does not properly deal with invisible text at the beginning of the line and my hope was that org had figured out how to counter that.

In a way it has. It comes with its own commenting functionality by setting comment-region-function and others. It doesn't do this to deal with this particular issue but because it has special needs. From org.el:

;; Org comments syntax is quite complex.  It requires the entire line
;; to be just a comment.  Also, even with the right syntax at the
;; beginning of line, some elements (e.g., verse-block or
;; example-block) don't accept comments.  Usual Emacs comment commands
;; cannot cope with those requirements.  Therefore, Org replaces them.

;; Org still relies on 'comment-dwim', but cannot trust
;; 'comment-only-p'.  So, 'comment-region-function' and
;; 'uncomment-region-function' both point
;; to 'org-comment-or-uncomment-region'.  Eventually,
;; 'org-insert-comment' takes care of insertion of comments at the
;; beginning of line.

;; 'org-setup-comments-handling' install comments related variables
;; during 'org-mode' initialization.

So this implementation doesn't have the issue of the default implementation, but it is highly specialized and not suitable for use in non-org buffers.

I am afraid I am going to have to close this as wontfix. If you cannot live with this, then I suggest that you bring it up with the emacs maintainers as you should be able to reproduce this with any invisible (and/or intangible) text at the beginning of a line.

from orglink.

Related Issues (9)

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.