unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: on-screen
Date: Wed, 21 Oct 2015 21:04:10 +0200	[thread overview]
Message-ID: <87vba0avrp.fsf@web.de> (raw)
In-Reply-To: <m2k2qg13sq.fsf@newartisans.com> (John Wiegley's message of "Wed,  21 Oct 2015 11:20:53 -0700")

"John Wiegley" <johnw@newartisans.com> writes:

> Just two comments:

That was quick!  Thanks for having a look.

>
>   (let ((method `(,on-screen-highlight-method . ,on-screen-inverse-flag)))
>
> Is the same as:
>
>   (let ((method (const on-screen-highlight-method
> on-screen-inverse-flag)))

I guess you mean `cons' ;-)  Then I agree.

> The other one is a matter of affecting the global environment. In
> `on-screen-initialize', you should pass `t' as a 3rd argument to
> add-hook, so the hooks are only affected in buffers where on-screen
> mode is active.

This is a actually an intended design choice.  What you suggest is not
sufficient if you scroll the "other" buffer via M-next/M-prior, or
scroll any buffer "with the mouse wheel" that is not current, but has
the mode on.  Then you still want to see the highlighting effect.

Another common use case is reading news with Gnus and scrolling the
article buffer with RET or Space: the summary buffer is current, but you
are reading, and scrolling the article buffer, which has the mode turned
on.

So, to avoid unnecessary complication, I decided to install my stuff in
the global hooks.  If you don't have any buffer with `on-screen-mode'
turned on visible, there is no performance loss this way, so I decided
that's acceptable.


Thanks,

Michael.



  parent reply	other threads:[~2015-10-21 19:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 17:02 [ELPA] New package: beacon Artur Malabarba
2015-10-15 17:24 ` Kaushal Modi
2015-10-15 17:26   ` Kaushal Modi
2015-10-15 17:33     ` Kaushal Modi
2015-10-15 21:27       ` Artur Malabarba
2015-10-15 21:37         ` Kaushal Modi
2015-10-15 21:44           ` Kaushal Modi
2015-10-15 22:13             ` Artur Malabarba
2015-10-15 22:27               ` Kaushal Modi
2015-10-15 22:40                 ` Kaushal Modi
2015-10-16  8:06                   ` Tassilo Horn
2015-10-15 22:47                 ` Artur Malabarba
2015-10-15 21:21   ` Artur Malabarba
2015-10-16 13:11     ` Phillip Lord
2015-10-16 13:54       ` Artur Malabarba
2015-10-15 21:42   ` Rasmus
2015-10-15 17:36 ` Marcin Borkowski
2015-10-15 17:55   ` Kaushal Modi
2015-10-15 18:17   ` Artur Malabarba
2015-10-15 18:31 ` Howard Melman
2015-10-15 21:36   ` Artur Malabarba
2015-10-21 17:10 ` [ELPA] New package: on-screen (was: [ELPA] New package: beacon) Michael Heerdegen
2015-10-21 18:20   ` [ELPA] New package: on-screen John Wiegley
2015-10-21 18:54     ` John Wiegley
2015-10-21 19:04     ` Michael Heerdegen [this message]
2015-10-21 19:28       ` John Wiegley
2015-10-22  7:26     ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vba0avrp.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).