Giter Site home page Giter Site logo

history's People

Contributors

emacs18 avatar mrbliss avatar tcw165 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

history's Issues

Make it possible to disable the echo area messages

Hi!

I've just started using history-mode and I like it a lot, thanks!

I find the messages in the echo area (that shows you where in the history you are) distracting however.

Would it be possible to add a defcustom to disable that?

Thanks again for a great mode!

Invalid window-start corrupt history stack

I have an issue where the history gets corrupted when I go history-prev-history then history-next-history.

I investigated and It seems to happen when (window-start) returns 1 when it should have returned > 1 in the advice after jump.

I debugged by adding some (message "..." ...) to a few functions, and annotated the output to hopefully explain what happens:

;; - starting in file test.rs, at char 136

;; - jumping to marker.rs@10630:
history-add-history ;; advice before jump
history-create/push-history (:marker #<at 136 in test.rs> :window-start 1)
racer-find-definition ;; jump
history-add-history ;; advice after jump
history-create/push-history (:marker #<at 10630 in marker.rs> :window-start 1)
;; >> WRONG (window-start) returned 1, should have returned 8718

;; - here, now running `M-: (window-start)` returns the right value of 8718, not 1

;; - go back to test.rs@136:
history-prev-history
history-use-current-history: (:marker #<at 136 in test.rs> :window-start 1)

;; - go next, return to marker.rs@10630:
history-next-history
history-use-current-history: (:marker #<at 10630 in marker.rs> :window-start 1)
;; >> now we are at wrong location: jumped at marker.rs@1153 instead of 10630,
;; probably because (set-window-start nil 1) should have been 8718
;; and then (goto-char 10630) somehow didn't work properly ??

;; - now at marker.rs@1153 instead of 10630

I don't have much idea what I'm doing here, poked around, I couldn't get (window-start) to return the right value, so tried something else and this seems to fix the issue for me, without breaking #6 :

diff --git a/history.el b/history.el
index f8aa91d9010d..d1faea30ece9 100644
--- a/history.el
+++ b/history.el
@@ -374,7 +374,7 @@ whether `history-window-local-history' is true or false."
     (set-window-buffer (history-window) buffer)
     (set-buffer buffer)
     ;; Update window-start.
-    (set-window-start nil wpos)
+    (set-window-start nil wpos 'noforce)
     ;; Update point.
     (goto-char pos)))

Not ideal I think, window-start/wpos is still invalid, but set-window-start with NOFORCE seems to not make goto-char go to the wrong location.


Note: It happens with all the jump functions I use; here is my config:

(require 'history)
(add-to-list 'history-advised-before-functions 'rtags-find-symbol-at-point t)
(add-to-list 'history-advised-after-functions 'rtags-find-symbol-at-point t)
(add-to-list 'history-advised-before-functions 'godef-jump t)
(add-to-list 'history-advised-after-functions 'godef-jump t)
(add-to-list 'history-advised-before-functions 'racer-find-definition t)
(add-to-list 'history-advised-after-functions 'racer-find-definition t)
(setq-default history-window-local-history t)
(history-mode 1)

emacs --version: GNU Emacs 26.1

History navigator does not indicate current line in terminal mode

When navigating between entries in history-goto-history in graphical Emacs the cursor moves to indicate the line in the buffer associated with the history record. However, there is only one cursor in terminal mode, and it is on the history navigator in the minibuffer. This means that there is no indication of which buffer line to look at.

Perhaps the cursor could be moved to the buffer, or perhaps the entire line could be highlighted (which would be useful even in graphical Emacs)?

Allow better control over ignored buffers.

Following code is repeated in two locations to determine whether a buffer can be marked:

(dolist (ignore history-ignore-buffer-names)
    (when (string-match ignore (buffer-name))

Relocate the code into a function such as ignore-buffer? so that users can advice it.

I want to preserve current functionality, but make an exception for ielm buffer.

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.