From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jesse Medeiros Newsgroups: gmane.emacs.devel Subject: Re: Patch to vertically center line content when using line-spacing variable Date: Thu, 12 Sep 2019 09:08:38 -0300 Message-ID: References: <83ftl85tbn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="110866"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , Stefan Kangas , emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 12 14:09:29 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i8Nug-000SfK-TJ for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 14:09:27 +0200 Original-Received: from localhost ([::1]:33734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Nuf-0006dQ-HR for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 08:09:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48686) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Nu9-00067q-2l for emacs-devel@gnu.org; Thu, 12 Sep 2019 08:08:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8Nu8-0002JU-1f for emacs-devel@gnu.org; Thu, 12 Sep 2019 08:08:52 -0400 Original-Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:43230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8Nu6-0002ER-L4; Thu, 12 Sep 2019 08:08:50 -0400 Original-Received: by mail-qt1-x843.google.com with SMTP id l22so29202987qtp.10; Thu, 12 Sep 2019 05:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=v/WZRdjcx8cYkwMy6xCnhtQwU+gSRGOzgBz1sB7n1Tk=; b=GiqcKTkfVGJNNWFaJ4R+ipOri1rrmSFqkSrBm3Ax2xv955qqDUNL3urCluXr+tAxuY wZVRktfQKB9LcN+WLCxgZhMGaOOUawmyd1NHedv2QSM7Q53h7IjteC3X1V1M1VSfqNa6 qmEqLqjkdfBAGIK1uQIbpl63sogbY9sbNc2b/YrO8tab+clj7hbDk9VvFz1e+wuQSP/e usVdGBJZGpstmKuesP4cy7bVWxSZzAuxCQPPmVYDOCiLb5mmvq7AQ4ejSObWxedCAVBc 06NdnhMhPiyHfq1ZVm2TrWVd42wIIgDac3/vFTxHu2+4RK700ozHin1JbrlsG66ZtWCZ Hl4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=v/WZRdjcx8cYkwMy6xCnhtQwU+gSRGOzgBz1sB7n1Tk=; b=U7TJOPK85T60B5BBtGQGttEeIi/Hfevu5QznWTFgpZQ67aP6SnG7TcgfZqHSUOqacd ue/4It5UxiwfJlykA8jnthzsu8n6r9/TjGOzU/RJdtKLlC3POveCbQRlqCUb0BDBB+O/ atDnmmlEvEMLRZiDIHKlfdhws0FLpRwMzGXc9bo50rVuTXgsWZjozDkPZwiU7Z3mSIfW 7sSSq1t4Yncgxq7NeZ4twIHUgK3k3o+XoahTzvNFVa61Mj5UEgF8HaOKSD1vcDvuGRX1 8Hjnku+MvO6rYg10nfm8DtSKkHpH1vv6zSopX8bveiQSDQrG1uwqbdrkvVv8q8EN9Jzv YJSw== X-Gm-Message-State: APjAAAU2DRlAt6+KyF2OnTU3p4xj6o8cOKWoOAIZRFBLKvPLYoFuXnsq 0l25XJqjAX+9RLqW6qhGYw177iF2ayrV5zIinoM= X-Google-Smtp-Source: APXvYqyxw3fDUk03c8/YYprUsvcqbXSHCv7VA0I5uXrWBB0ONXeUnkERFmHzjOIPk/Woycnyq5LsLp3Gxrfc4XygkU0= X-Received: by 2002:ac8:678f:: with SMTP id b15mr39265071qtp.293.1568290129257; Thu, 12 Sep 2019 05:08:49 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::843 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:239995 Archived-At: > Hmm, should this be customizable, like 'line-spacing' is? In any case, > I think the doc string of 'line-spacing' should refer to this new > variable as well. Yes, it's supposed to be customizable like line-spacing. Personally I think center vertically should be the default behaviour, but I created this new variable so it won't change with default to nil the setup of other people. > Also: could this not work as a new type of value for 'line-spacing' > instead? Something like > > '(both . 5) > > to mean 5 pixels above and below? I guess it could, but does that make sense? I think one would expect the line to be centered by default. That's how it works on other editors. > I don=CA=BCt think you implemented this as a frame parameter, which means= the > documentation should go in "@node Line Height" in display.texi, or you > could implement the frame parameter as well. [1] My bad. I searched for currencies of line-spacing at the docs and I though I had found the right place. I'll change this to display.texi. > Jesse> if (extra_line_spacing > 0) > Jesse> { > Jesse> - it->descent +=3D extra_line_spacing; > Jesse> + if (! BVAR (XBUFFER (it->w->contents), line_spacing_ver= tical_center)) > > I think this currently works because Qnil =3D=3D 0, for now, but you shou= ld > probably use NILP. Good catch, thanks. PS: Sorry for the late reply, it's been a busy week.