From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Colin Woodbury Newsgroups: gmane.emacs.bugs Subject: bug#23574: 24.5; Overzealous underlining in emacs-nox Date: Mon, 6 Jun 2016 11:25:34 -0700 Message-ID: References: <83porxwg1f.fsf@gnu.org> <83d1nxudrb.fsf@gnu.org> <83wpm3tyvn.fsf@gnu.org> <83twh7tt83.fsf@gnu.org> <83r3cbt5l3.fsf@gnu.org> <83h9d6tl3j.fsf@gnu.org> <5755AACE.8030303@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141146acef5a90534a03207 X-Trace: ger.gmane.org 1465237673 26980 80.91.229.3 (6 Jun 2016 18:27:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jun 2016 18:27:53 +0000 (UTC) Cc: 23574@debbugs.gnu.org, John Mastro , Noam Postavsky To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 06 20:27:43 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1b9zFX-00018a-1H for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jun 2016 20:27:43 +0200 Original-Received: from localhost ([::1]:44479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9zFW-0000i8-BW for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jun 2016 14:27:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9zDy-00088T-Q2 for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2016 14:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9zDu-0004sQ-EP for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2016 14:26:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9zDu-0004sK-BA for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2016 14:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b9zDu-0006Td-71 for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2016 14:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Colin Woodbury Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jun 2016 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23574 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 23574-submit@debbugs.gnu.org id=B23574.146523754524874 (code B ref 23574); Mon, 06 Jun 2016 18:26:02 +0000 Original-Received: (at 23574) by debbugs.gnu.org; 6 Jun 2016 18:25:45 +0000 Original-Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9zDc-0006T7-NH for submit@debbugs.gnu.org; Mon, 06 Jun 2016 14:25:45 -0400 Original-Received: from mail-lf0-f46.google.com ([209.85.215.46]:35977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9zDZ-0006Sq-DG for 23574@debbugs.gnu.org; Mon, 06 Jun 2016 14:25:43 -0400 Original-Received: by mail-lf0-f46.google.com with SMTP id b73so100086148lfb.3 for <23574@debbugs.gnu.org>; Mon, 06 Jun 2016 11:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=azavea.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=N0gbSWtguH7VIauXQSYveePOBZQeMXJJbaijpUiOAqI=; b=iz0hq1GTjENt4HH/TYxYk4EaH8VFX42flpioETuK9CGZ14nHd5UYvFiF/ei5Y81cUd PMzNjRTqL/OCz6Kvzem/fifLJSLeab7yzrZ2kmiNLuygy/8Aq5ldXY+bc5uw0VDVz5ie f/tGYX05LiwpbdJaVNQvFYK0aAhH5o9jno0VU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=N0gbSWtguH7VIauXQSYveePOBZQeMXJJbaijpUiOAqI=; b=NJd7A/0roiBFn2Efrz5bCjgYTo1TGRLXi/H+5h/9OT2LRsNlANgy18hg7ewufjLgT2 Quk2lhZNT9y7SOBHlhTdPksjJv/crpfpmHBfJ6BOHYoF4Ri5JXpzig6RRBENDOmfOsp7 GyI1DAtYCESHVLwJ59bGWPBDOKhz+YxPqBy2NV+U7CbUl9l3lWfPfYYUO1HAvBKoBN79 2E2fQdXNOhU8GqSaICOYJZBBPAZvEovSohveToIMR+DLgYWrf2JqDYws1IltEzUv6I35 xrxI+RlrHV+RF3Rvr9ZSQrRofbU15Zs+V6Ho7U8LPdmpgh5bzeN53T96yhmkBkfl/HDG Vrcw== X-Gm-Message-State: ALyK8tIUovG97N8wI5xhf3Tj5UbhuwPOZ2YgNzYIQngZ5JHpf14tIcgrOusdhOk4aDzjmXDkrR85tK39wTZZ57Yp X-Received: by 10.25.170.140 with SMTP id t134mr1367497lfe.17.1465237535382; Mon, 06 Jun 2016 11:25:35 -0700 (PDT) Original-Received: by 10.25.32.212 with HTTP; Mon, 6 Jun 2016 11:25:34 -0700 (PDT) In-Reply-To: <5755AACE.8030303@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119171 Archived-At: --001a1141146acef5a90534a03207 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Yes. However, I believe that this is what the original ensime code > intended to do; it only underlines the newlines themselves because > it's easier to make 1 overlay for all the lines at once and the > programmer didn't notice it was wrong because it happens to give the > desired effect in GUI mode. I think that's the case. The purpose of the underlining is to show where "Scala implicits" are occuring. An implicit is some code brought into scope through imports, often used for silent conversion to inject methods into preexisting datatypes. Essentially that with "traits" are how Scala hacks Haskell typeclasses. If your statement that uses an implicit happens to span multiple lines, ensime (I believe) just finds the starting and ending points of the statement and applies the face to the entire area. In the GUI, this happens to produce the desired effect of only underlining where characters are (with the newline as well, as mentioned previously). In TTY this places the face over everything, which we don't agree is a bug or not. On Mon, Jun 6, 2016 at 9:54 AM, martin rudalics wrote: > > Going back to the bug report, there's still one issue to consider: > > should we add underline (and then also overline and strikethrough) to > > the list of face attributes that cause face extension on GUI frames. > > The logic behind the current code seems to be to extend attributes > > that are related to background of the text. The above 3 seem to be a > > kind-of background, so maybe we should add them. > > It would make my life much easier if face extension were, in general, > customizable. I would immediately turn it off everywhere. > > My motivation is that I have font-lock distinguish things like comments > and strings mainly by their background face. Since these look awful > when extending to the end of a window, I have to provide my own > =E2=80=98font-lock-fontify-syntactically-region=E2=80=99 function which a= ssures that > newline characters within strings and comments never get the > corresponding face. This consumes resources and, for example, disallows > using text properties to skip the rest of a comment or a string. It > goes without saying, that my version of this function is never in synch > with the one of the repository. > > I also use separate background colors for editable fields, buttons, > links and the like which also look awful when spanning two or more > lines. No font-locking can help me here. > > martin > > --=20 Colin Woodbury Geotrellis Team @ Azavea --001a1141146acef5a90534a03207 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> Yes. However, I believe that this is what t= he original ensime code
> intended to do; it only underlines the newlines themselves because
> it's easier to make 1 overlay for all the lines at once and the > programmer didn't notice it was wrong because it happens to give t= he
> desired effect in GUI mode.

I think that's the case. = The purpose of the underlining is to show where "Scala implicits"= are occuring. An implicit is some code brought into scope through imports,= often used for silent conversion to inject methods into preexisting dataty= pes. Essentially that with "traits" are how Scala hacks Haskell t= ypeclasses.

If your statement that uses an implicit happens t= o span multiple lines, ensime (I believe) just finds the starting and endin= g points of the statement and applies the face to the entire area. In the G= UI, this happens to produce the desired effect of only underlining where ch= aracters are (with the newline as well, as mentioned previously). In TTY th= is places the face over everything, which we don't agree is a bug or no= t.

On Mo= n, Jun 6, 2016 at 9:54 AM, martin rudalics <rudalics@gmx.at> w= rote:
> Going back to= the bug report, there's still one issue to consider:
> should we add underline (and then also overline and strikethrough) to<= br> > the list of face attributes that cause face extension on GUI frames. > The logic behind the current code seems to be to extend attributes
> that are related to background of the text.=C2=A0 The above 3 seem to = be a
> kind-of background, so maybe we should add them.

It would make my life much easier if face extension were, in general,
customizable.=C2=A0 I would immediately turn it off everywhere.

My motivation is that I have font-lock distinguish things like comments
and strings mainly by their background face.=C2=A0 Since these look awful when extending to the end of a window, I have to provide my own
=E2=80=98font-lock-fontify-syntactically-region=E2=80=99 function which ass= ures that
newline characters within strings and comments never get the
corresponding face.=C2=A0 This consumes resources and, for example, disallo= ws
using text properties to skip the rest of a comment or a string.=C2=A0 It goes without saying, that my version of this function is never in synch
with the one of the repository.

I also use separate background colors for editable fields, buttons,
links and the like which also look awful when spanning two or more
lines.=C2=A0 No font-locking can help me here.

martin




--
<= div>Colin Woodbury
Geotrellis Team @ Azavea
--001a1141146acef5a90534a03207--