back-button icon indicating copy to clipboard operation
back-button copied to clipboard

This turns off visible mark mode after being used!

Open JSpenced opened this issue 7 years ago • 2 comments

Can visible mark mode be permanently disabled in the package?

Whenever I use it, it turns off visible mark mode in my buffers which I normally use. I prefer it not to use visible mark mode.

JSpenced avatar Dec 24 '18 09:12 JSpenced

Hi! I missed your message over the holidays.

Isn't turning off visible-mark mode as simple as uninstalling the visible-mark library?

rolandwalker avatar Jan 19 '19 17:01 rolandwalker

I want visible mark-mode as I use it to show the last two positions of the mark, but this was disabled after changing marks using your package. There was no setting I could see that would completely disable visible-mark mode in your package if it was installed.

I ended up modifying these two functions like this (I think these were the only two):

(defun back-button-pre-command-hook ()
  "Re-enable toolbar buttons and hide visible marks."
  (when (and (featurep 'visible-mark)
             (not visible-mark-mode))
    )
  (setq back-button-global-disable-direction nil))

(defun back-button-visible-mark-show (type)
  "Show marks temporarily using `visible-mark'.

TYPE may be 'global or 'local."
  (when (and (featurep 'visible-mark)
             (not visible-mark-mode))
    (dolist (win (window-list))
      (with-current-buffer (window-buffer win)
        (when (not (minibufferp (current-buffer)))
          )))))

A hacky solution but seemed to work. I know there is a better way to do this though.

JSpenced avatar Jan 20 '19 01:01 JSpenced