GithubHelp home page GithubHelp logo

beacon's People

Contributors

amno1 avatar damiencassou avatar malabarba avatar nicolaspetton avatar syohex avatar tsdh avatar yangsheng6810 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  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  avatar  avatar

Watchers

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

beacon's Issues

wrong-type-argument listp magit-status-mode

This commit causes this error now:
backtrace.txt

I am on Emacs 25.0.50.1, Debian sid.

I fixed it like this:

(defcustom beacon-dont-blink-major-modes '(magit-status-mode
                                           magit-popup-mode
                                           gnus-summary-mode
                                           gnus-group-mode)
  "A list of major-modes where the beacon won't blink.
Whenever the current buffer satisfies `derived-mode-p' for
one of the major-modes on this list, the beacon will not
blink."
  :type '(repeat symbol))

`beacon-blink-when-point-moves-vertically` should respect scrolling via `next-page` and `previous-page`

This package is great! I was doing something similar in my .emacs.d extending the built-in pulse package, but this is much nicer and cleaner implementation.

I'm noticing though that when I'm scrolling via next-page / previous-page (C-n / C-p) and I go under the threshold of my scroll-margin so that the window starts scrolling, beacon will trigger on each new line, regardless of the value of beacon-blink-when-point-moves-vertically.

Here are the values of my scrolling customizations for reference:

(setq scroll-margin 24
      scroll-conservatively 10000
      scroll-preserve-screen-position 'always
      auto-window-vscroll nil)

Doesn't work with mode-icons

When mode-icons mode is on, the beacon stays around until I insert a character or M-x. Very occasionally it disappears on its own. Thanks for any help you could offer in debugging this issue.

Very cool package, thanks!

Allow beacon to blink only on lines moving (vertical), not horizontal

After upgrading Beacon to the latest master branch from MELPA, I noticed something was changed.

When I move a specific amount of lines down of up, the cursor will blink with beacon. Now it's also blinking when I move a specific amount of words forward or backwards.

I wouldn't do that. Is there any way to disable that?

Flickering Cursor

Thank you for this package it's really a nice visual extension :)

I have one problem:
Sometimes the cursor is flickering while the effect is in action. Do you have the same behaviour on your side?

Unable to install in Emacs 25

Hey Arthur,

Do you have any idea why package.el would complain that seq is not installable in Emacs 25 (the emacs-25 branch)?

beacon is an incompatible package.

     Status: Incompatible because it depends on uninstallable packages.
    Archive: gnu

    Version: 0.5.1
    Summary: Highlight the cursor whenever the window scrolls
   Requires: seq-1.11 (not available)
   Homepage: https://github.com/Malabarba/beacon
   Keywords: convenience 
beacon is an incompatible package.

     Status: Incompatible because it depends on uninstallable packages.
    Archive: melpa

    Version: 20151205.1003
    Summary: Highlight the cursor whenever the window scrolls
   Requires: seq-1.11 (not available)
   Homepage: https://github.com/Malabarba/beacon
   Keywords: convenience 

All I do have is seq 1.8 built-in Sequence manipulation functions in the list of packages (but not 2.3 as suggested in melpa/melpa@76b7b90).

Beacon-mode not working after starting Emacs

Setup:

GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
of 2015-07-25 on KAEL

Compiled from EmacsW64.

Beacon, using the latest version of Beacon from MELPA

Windows 7 x64 bit.

Situation:

Thanks for creating this package! I use the use-package, and I configured beacon as following:

(use-package beacon
    :config
    (setq beacon-mode 1)
    (setq beacon-blink-delay 0.2)
    (setq beacon-blink-duration 0.2)
    (setq beacon-blink-when-point-moves 7)
    (setq beacon-blink-when-window-changes nil)
    (setq beacon-blink-when-window-scrolls nil)
    (setq beacon-color "brown")
    (setq beacon-push-mark 5)
    (setq beacon-size 25)
)

In my dot-Emacs. When I start Emacs, and move around with the cursor, I don't see the beacon. When I disable the beacon-mode and enable it again, then I'll see the beacon. I find that weird, given the fact that beacon-mode is already enabled on startup.

beacon

Perhaps a bug?

Moving the cursor on to a long line causes it to wrap

Let's say a line is just shorter than what can be accommodated on the screen and the cursor is at the end of the line. Then if I move off that line and back, the line appears to grow causing it to wrap and then shrink back at the end of beacon's animation.

I'm guessing this is because as a part of beacon's animation, you /add/ some extra characters on to the end of the line to highlight their background?

Beacon gives "mark set" message when scrolling

Every time when I do a scroll action (Page up, page down), I get the following message in the minibuffer

  Mark set

After bisecting my Emacs configuration, it turned out I get this message when beacon-mode is enabled.
I could never figure out why this message is popping up when beacon-mode is enabled.

Emacs version is (latest snapshot for ubuntu):

   GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2015-10-28

And setup of Beacon is:

  (beacon-mode 1)
  (setq beacon-dont-blink-major-modes (quote (magit-status-mode dired-mode eshell-mode))
    beacon-blink-delay 0.2 
    beacon-blink-duration 0.2
    beacon-blink-when-point-moves 7
    beacon-blink-when-window-changes nil
    beacon-blink-when-window-scrolls nil
    beacon-color "brown"
    beacon-push-mark 5
    beacon-size 25)

Any suggestion why I get the message "Mark set"?

beacon-blink not blinking the beacon when called from emacs-lisp

I am making a small script that should blink beacon as a part of it's execution. I can run 'M-x beacon-blink' and the beacon blinks but if evaluating the function call (beacon-blink) produces no output. Is there a special way I should be calling that function that is different from running the command?

not able to customize beacon color

I was trying to customize the beacon color with M-x customize-group. The instructions for doing so are "
If it is a string, it is a color name or specification,
e.g. "#666600"."".

However, when i try to enter "blue" or even your suggestion of "#666600", I get a warning at the bottom that "Saving beacon-color: This field should contain a number (floating point or integer)". I tried to change the types on (defcustom beacon-color :type '(choice number color)) but changing color to string left me no better off.
screen shot 2015-10-16 at 4 47 59 pm

Odd issues with becaon and info

I've noticed two issues when using info buffers with beacon enabled:

  1. The beacon flashes when using C-p to move the cursor from the node title to the preceding blank line. This happens irrespective of the setting of beacon-blink-when-point-moves.
  2. Pressing C-p again to move to the node name causes a strange delay (~2-3 s on my machine), and a beacon overlay which is a solid color across the entire line. This occurs only if beacon-blink-when-point-moves is set to an integer (values I tried were 1 and 20).

This is on an X11 frame running under linux with a recent-ish emacs git master. Steps to reproduce:

  1. Activate beacon mode
  2. C-h i
  3. m Elisp RET
  4. C-n
  5. C-p (triggers point 1)
  6. C-p (triggers point 2, if b-b-w-p-m is set appropriately)

Beacon on window focus

Caveat: it's possible beacon can already to what I want, and I just don't grok how. Maybe this is a feature request? Hard to say.

A time when beacon could improve my programming life dramatically would be on changing window focus. The scenario goes like so: I have emacs subdivided in to four or five windows; I change window focus to a browser to look up documentation, say; when I re-focus on emacs, I have to find point.

So. Should beacon-blink-when-window-changes already be doing this? (Beacon fires for me when I change between windows within emacs, but not when I change between application windows.) Would this be possible at all? Another approach would be a defun to allow a "where is my cursor?" keyboard command -- thoughts?

Thanks for the awesome package!

Blinking beacon displaces text

I recently upgraded from beacon-20160206.917 to beacon-20160321.551. I’ve noticed that now, at least in mu4e-headers-mode, the blinking beacon will displace text in the first line of the buffer.

screenshot

This displacement is «animated», i.e., as the beacon blink shrinks away, the displaced text will gradually slide back into its intended position.

This happens only when the buffer is initially constructed. Once it’s open, doing M-x beacon-blink will blink the beacon without triggering this effect.

So far I’ve only observed this in the mu4e headers list.

Blinking when hl-line-mode is on

The default value for beacon-dont-blink-predicates includes this line:

(add-hook 'beacon-dont-blink-predicates (lambda () (bound-and-true-p hl-line-mode)))

This makes it harder than it needs to be to combine blinking with hl-line-mode (no way to remove-hook). Is there a deep reason for this? When I (setq beacon-dont-blink-predicates) and turn on hl-line-mode things seem to work fine.

I can see a few ways to change this.

  • completely remove this predicate
  • add a variable, beacon-disable-for-hl-line-mode, and change the predicate to (lambda () (and beacon-disable-for-hl-line-mode (bound-and-true-p hl-line-mode))), so that changing this behavior is as simple as (setq beacon-disable-for-hl-line-mode nil)
  • bind the predicate to a function, so that remove-hook works

thanks for writing this, by the way--it's useful.

Does not "shine" when doing C-l (recenter-top-bottom)

When recentering the screen on the cursor at the center, top or bottom of the window the beacon should shine - since the content of the window changes, since we move in the file, and the position of the cursor changes. At least it appears illogical, why it does not shine in this case....

wrong-type-argument stringp nil

Hey @Malabarba! First off, great tool you wrote here - I've already noticed a difference in not searching around for my cursor so much when navigating files.

I seem to be encountering an issue now whenever beacon is working. I have (setq debug-on-error t) in my config, which produces the following constantly:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("\\`unspecified-" nil)
  beacon--color-range()
  beacon--shine()
  beacon-blink()
  beacon--window-scroll-function(#<window 3 on init.el> 9862)
  redisplay_internal\ \(C\ function\)()

My config is exactly the same as from your beacon post, but used with use-package. This was also installed via MELPA.

Let me know if I can help provide anymore info. I had to disable beacon temporarily :-/

Please tag latest commit

Could you please tag the current commit so that your package appears on melpa stable? You can do it through github in the "releases" tab or through git tag. Thanks

beacon-blink: Symbol's function definition is void: seq-find

This looks really cool. I just installed it from MELPA, but it's not working, and I see this in the messages:

beacon-blink: Symbol's function definition is void: seq-find [7 times]
Error in post-command-hook (beacon--post-command): (void-function seq-find)

I upgraded the seq package and now it works. I guess that function was added in the last few months.

Beacon stays active in dired-mode

I have beacon enabled in my config:

 (use-package beacon
  :ensure t
  :config
  (beacon-mode 1)
  (setq beacon-color "cyan"))

When I open a directory with dired, the beacon stays active and does not disappear...

Feature request: be able to pulse beacon on command

I would like to make a request for a feature I didn't see, apologies if I missed it. It would be nice to be able to have an interactive command that allows the user to pulse the beacon at any time, even without buffer movement.

This would be similar to functionality offered by 'hi-line-flash or 'crosshairs-flash.

Thank you.

Disable during edebug?

Hi,

Would it be a good idea to disable beacon when edebug-active is t?

Because right now, the beacon flashes as the cursor jumps to the next form as I hit SPC during edebug.

Load time

I load Beacon via use-package:

(use-package beacon)

Which takes a while!

Loading package beacon...done (5.682s)

Loading the beacon package (not even enabling the mode) appears to take 5 to 7 seconds on my 2.5 GHz Intel Core i5.

I'd like to use it, but that addition to Emacs' init time is... too much. Any ideas?

emacs --daemon don't start anymore

This bug as already been reported on your blog here.

Calling emacs --daemon with beacon enabled make the daemon to never start, it get stuck in his initialisation phase without complaining or anything else. So doing emacs --daemon --debug-int doesn't work as it never start.
The solution proposed by @manuel-uberti in the comment's of your blog doesn't work for me.

To reproduce start emacs --daemon, connect to it with an emacsclient, load beacon, evaluate (beacon-mode 1), select another window C-x o then it report Error in post-command-hook (beacon--post-command): (error "Invalid color").
Following is the backtrace:

Debugger entered--Lisp error: (error "Invalid color")
  color-distance("black" nil)
  beacon--color-range()
  beacon--shine()
  beacon-blink()
  beacon--blink-on-focus()
  run-hooks(focus-in-hook)
  handle-focus-in((focus-in #<frame emacs@noisette 0x670fb68>))
  call-interactively(handle-focus-in nil [(focus-in #<frame emacs@noisette 0x670fb68>)])
  command-execute(handle-focus-in nil [(focus-in #<frame emacs@noisette 0x670fb68>)] t)
  recursive-edit()
  debug(debug)
  debug--implement-debug-on-entry(1)
  apply(debug--implement-debug-on-entry 1)
* other-window(1)
  call-interactively(other-window nil nil)
  command-execute(other-window)

Beacon not active when point moves.

I have this in my init file:

(beacon-mode 1)
(setq beacon-blink-when-point-moves-vertically 1)
(setq beacon-blink-when-point-moves-horizontally 1)

Yet, the beacon only shows when I scroll. I would like it to show up any time I move the cursor using the arrow keys. Not sure if I'm missing something or this is a genuine bug.

Disable blink during vertical scroll

For whatever reason, setting beacon-blink-when-window-scrolls nil seems to have no effect. When I scroll using scroll-up-command it still blinks. Restarting emacs had no effect. Using beacon 20151025.828 from melpa.

How do I set beacon-color from my color theme?

I would like to set my beacon-color to "#721cd4".

How can I set this from my init.el or from my color theme? Is there an example I could use with a string color value?

(My elisp is not very good, so any help is appreciated. I can set a face easily, but I'm having trouble figuring out how to set beacon-color)

Improvement suggestions

After fixing #1 locally, I'm now using spotlight for about half an hour and basically I like it. However, there are some improvements you might want to consider.

  1. I think it would be more visually appealing and intuitive if the spotlight highlight would extend to the left and the right instead of only to the right, e.g., the character under point would be in the spotlight and the neighboring characters a bit less so. I guess that should be configurable because in the end someone will want a cross-hair spotlight or a spotlight spiral.
  2. Spotlighting doesn't work when point is on an empty line or at the end of a line. Suggestion 1 would at least improve the end-of-line situation, too. But I think you can't do much about the empty lines problems (although this situation is covered by the code and contains a commented funcall (spotlight--after-string)...

Symbol's function definition is void: seq-do, only in Emacs 25

I have both Emacs versions, 24.5.3 and 25.1.50.2.
In v24 beacon is loaded well and everything is working good.
In v25 there is Symbol's function definition is void: seq-do.
My seq.el version listed in package-list-packages is latest (2.15).
I've also tried to start without init.el using emacs -q and then tried:
(require 'seq) and then M-x describe-function seq-do and it shows the documentation which means that it is loaded.
Also, beacon is not the only package that suffers with this, flycheck have the same struggle.

Release on elpa

Despite your 1.3.2 release, gnu elpa still advertises 1.3.1 as latest. Could you please fix that?

Installing beacon-mode should install seq

Hello! beacon-mode is quite nice - I dig it.

Installing had a bit of a hiccup in that I did not already have the seq package installed.

I installed seq manually, but it should be really included in beacon-mode's dependencies.

Thanks again!

lexical-binding syntax

Hi. This looks fantastic. I saw it on the emacs mailing list and I'm very interested. I'm still not super good at some things, but i cloned your repo and put it in my load path. At the moment, my emacs, (version 24.4) does not like the lines lexical-binding: t at the top and end of the file. The documentation that I've seen from emacs seems to think that this should be set. Switching the style to (setq lexical-binding t) solves this issue quite well, but I just wanted to make sure I was doing everything in the manner everything was to meant to be.

Conflict with eyebrowse package

If there is only one eyebrowse workspace the point blinks and has this nice smooth-fading transition. If there is more than one workspace in eyebrowse then the beacon still appears but does not have a transition it just instantly disappears after beacon-blink-durationruns out.

EDIT:
It seems that sometimes a few workspaces need to exist for the issues to be properly replicated.

Beacon interferes with ediff

Beacon mode causes errors when ediff is run. Probably everything ediff related should be put on the beacon-dont-blink-major-modes list globally.

calfw compatibility

Thinking about calfw, beacon-blink-when-point-moves is very handy with respect to vertical movement, but, would it be possible to get the equivalent for columns (horizontal movement) ?
Great package, really useful, thanks !

Starting as daemon

Starting emacs with --deamon will yield the following error:
Error in post-command-hook (beacon--post-command): (wrong-type-argument number-or-marker-p nil)

Support different beacon shapes

Currently, the only supported beacon is a linear decay from the cursor to the right.
I'd like to support other beacons, like a symmetric beacon, a different decay pattern, a circle shape, or a cross-hair shape.

The easiest way to do this would be changing the code to completely recreate all overlays at each frame (current logic creates them once and then moves them around) where the colors are gathered by calling beacon--color-range with one argument (the curent frame number of the animation).

Then, implementing different beacons should be as simple as providing different beacon--color-range functions.

My only concern with this approach would be performance, since it would recreate all overlays at each frame.

`beacon-blink-when-buffer-changes` seems to not be used

Hi, I wanted the beacon to blink when I switch buffers also. I see that there's a variable beacon-blink-when-buffer-changes in the code but it seems it is not used.
Shouldn't it be used in beacon--post-command?

I use version 20160206.917 from melpa.

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.