From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: beacon Date: Thu, 15 Oct 2015 17:44:07 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113b962678a86c05222b96eb X-Trace: ger.gmane.org 1444945547 10863 80.91.229.3 (15 Oct 2015 21:45:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Oct 2015 21:45:47 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 15 23:45:46 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZmqLI-0000xM-Tp for ged-emacs-devel@m.gmane.org; Thu, 15 Oct 2015 23:45:45 +0200 Original-Received: from localhost ([::1]:49873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmqLI-0001Dc-CS for ged-emacs-devel@m.gmane.org; Thu, 15 Oct 2015 17:45:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmqKU-0000w7-5n for emacs-devel@gnu.org; Thu, 15 Oct 2015 17:44:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmqKO-0008E8-3S for emacs-devel@gnu.org; Thu, 15 Oct 2015 17:44:53 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:36393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmqKN-0008DB-GI for emacs-devel@gnu.org; Thu, 15 Oct 2015 17:44:47 -0400 Original-Received: by oihr205 with SMTP id r205so54045117oih.3 for ; Thu, 15 Oct 2015 14:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=tJVkfTNLnec2VJ/kcAFphOWP5lXACL+8xFKdsBmePHc=; b=pmmsIiplR8oX8XEYY8RkDHD5dCSOnjCcT3Iw62ndUh2xbQdBqHr/6qdDqiqNSV4Bwo PJnFrHqFan5zucTXdgG8E0jLiZX7xRC81D2D3NulP2YeU76dctghtYBMUBmOpyetsKc/ JsM84vo9oLzEgwGMY4T12NJN1Jzjhq2I5bIDEIl13XsogpQUYXUfPYwoetMbvge6kg1S ub8T4oWyKNhC3rIkij0i5//Og+hY+qNMBteCkq01wsXm+k+DKhHSdPlmCkXjEksa2wo5 VvovawhcmPiB0mKr8fVQKGDkm8YugAACrBlJw1od80cZGkaijfzkuEI6WkMaYeN06qqm luwQ== X-Received: by 10.202.3.131 with SMTP id 125mr3062268oid.134.1444945486978; Thu, 15 Oct 2015 14:44:46 -0700 (PDT) Original-Received: by 10.202.44.8 with HTTP; Thu, 15 Oct 2015 14:44:07 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191693 Archived-At: --001a113b962678a86c05222b96eb Content-Type: text/plain; charset=UTF-8 OK, I think I need to reenable fci-mode at the end of beacon--dec. It seems to sort of work, just that the fci-mode gets re-enabled too soon, slightly before the beacon trails finish vanishing. -- Kaushal Modi On Thu, Oct 15, 2015 at 5:37 PM, Kaushal Modi wrote: > This gif shows the problem with fci-mode enabled: > http://i.imgur.com/G2ojtKc.gifv > > That vertical line on the right is what the Fill Column Indicator package > is inserting. With that persistently enabled, you can see that it messes up > the beacon.. the cursor keeps on jumping to the set column. > > I tried this to disable fci at the right time: > > (defun beacon--shine () > "Shine a beacon at point." > (setq-local sanityinc/fci-mode-suppressed fci-mode) > (when fci-mode > (turn-off-fci-mode)) > (let ((colors (beacon--color-range))) > (save-excursion > (while colors > (if (looking-at "$") > (progn > (beacon--after-string-overlay colors) > (setq colors nil)) > (beacon--colored-overlay (pop colors)) > (forward-char 1)))))) > > > But I cannot figure out where to reenable it.. it didn't work if I tried > to renable at the end of beacon--shine or beacon-blink. > > > -- > Kaushal Modi > > On Thu, Oct 15, 2015 at 5:27 PM, Artur Malabarba < > bruce.connor.am@gmail.com> wrote: > >> >> 2015-10-15 18:33 GMT+01:00 Kaushal Modi : >> >>> BTW, I just tried it out and it looks great! I like that meteor trail >>> effect :) >>> >>> I now just need to figure out how to make it play nice with fci-mode. >>> >>> If a beacon pre/post hook is available, I can disable/enable fci-mode in >>> there. >>> >> >> Before I push this tomorrow there'll be a way to conditionally avoid >> blinking. Would that help? What's fci-mode like and why does it conflict? >> > > --001a113b962678a86c05222b96eb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
OK, I think I need to reenable fci-mode at= the end of beacon--dec. It seems to sort of work, just that the fci-mode g= ets re-enabled too soon, slightly before the beacon trails finish vanishing= .


= --
Kaushal Modi

On Thu, Oct 15, 2015 at 5:37 PM, Kaushal Mod= i <kaushal.modi@gmail.com> wrote:
This gif shows the= problem with fci-mode enabled:=C2=A0http://i.imgur.com/G2ojtKc.gifv

That vertical line on t= he right is what the Fill Column Indicator package is inserting. With that = persistently enabled, you can see that it messes up the beacon.. the cursor= keeps on jumping to the set column.

I tried this to disable fci at the right time:=

(defun beacon--shine ()
=C2=A0 "Shine a beacon at point."
=C2=A0 (setq-local sanityi= nc/fci-mode-suppressed fci-mode)
=C2=A0 (= when fci-mode
=C2=A0 =C2=A0 (turn-off-fci= -mode))
=C2=A0 (l= et ((colors (beacon--color-range)))
=C2= =A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 = =C2=A0 (while colors
=C2=A0 =C2=A0 =C2=A0= =C2=A0 (if (looking-at "$")
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (progn
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (beacon--after-str= ing-overlay colors)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq colors nil))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (beacon--colored-overlay (pop colo= rs))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= forward-char 1))))))


But I c= annot figure out where to reenable it.. it didn't work if I tried to re= nable at the end of beacon--shine or beacon-blink.


--
Kaushal Modi

On Thu, Oct 15, 2015 at 5:27 PM, Artur Malab= arba <bruce.connor.am@gmail.com> wrote:

2015-10-15 18:33 GMT+01:00 Kaushal Modi <kaushal.modi@gmail.com&= gt;:
BTW, I just tried it out and it looks great! = I like that meteor trail effect :)

I now just need to fi= gure out how to make it play nice with fci-mode.

If a be= acon pre/post hook is available, I can disable/enable fci-mode in there.

Before I push this tom= orrow there'll be a way to conditionally avoid blinking. Would that hel= p? What's fci-mode like and why does it conflict?
=


--001a113b962678a86c05222b96eb--