Skip to content

Provide method for clearing errors in buffer. #698

Closed

Description

@edw

It can be difficult to read code, especially large regions of code, that have an error overlay applied. AFAIK, Emacs does not provide a command for removing overlays, so one needs to M-: (delete-all-overlays) RET to remove the error. This is a hassle. I've currently bound this procedure to C-x C-M-e:

(defun cider-clear-errors ()
  (interactive)
  (delete-all-overlays))

Activity

  1. bbatsov commented on Aug 4, 2014

    @bbatsov
    Member

    That's a bit too extreme (as it will delete unrelated overlays). A proper solution would be:

    (remove-overlays (point-min) (point-max) 'cider-note-p t)
    

    Guess we can wrap this in an interactive command.

  2. vspinu commented on Aug 4, 2014

    @vspinu
    Contributor

    Are you talking about the compilation error message? If so it's only one in the whole buffer and #690 deletes it once you modify the region. I have been using it for a day now and it feels pretty right. Alternatively it can be deleted when the pointer enters the error region or on a timeout. I am a bit inclined towards deleting it on entering. I will try it today.

  3. vspinu commented on Aug 4, 2014

    @vspinu
    Contributor

    It turns out that point-entered hook is a text and not an overlay property. So sorry, it's too complicated.

    As we are on it, I think CIDER should blink the region when jumping to an error and don't leave an overlay at all. This is precisely how comilation in emacs works (see next-error-highlight). Unfortunately cider is not quite integrated with emacs next-error functionality. I plan to look more comprehensively into this issue at the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions