From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.bugs Subject: bug#36861: 27.0.50; display-fill-column-indicator-mode in log-edit-mode Date: Sun, 04 Aug 2019 02:51:04 +0200 Message-ID: References: <875znjntfe.fsf@mail.linkov.net> <83mugvhr66.fsf@gnu.org> <871ry6rksu.fsf@mail.linkov.net> <83zhksexvx.fsf@gnu.org> <87sgqhricg.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----0F9DPDWAX8IA9A0W87OY0QCMRKVV10" Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="28862"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: K-9 Mail for Android Cc: 36861@debbugs.gnu.org To: Juri Linkov ,Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 04 02:52:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1hu4kt-0007NT-0m for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 02:52:11 +0200 Original-Received: from localhost ([::1]:42470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu4kr-0004CY-Jf for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 20:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54907) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hu4kl-0004CM-Rp for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 20:52:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hu4kk-00064p-C8 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 20:52:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51413) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hu4kk-00064l-9T for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 20:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hu4kk-0000Wa-6D for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2019 20:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2019 00:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36861 X-GNU-PR-Package: emacs Original-Received: via spool by 36861-submit@debbugs.gnu.org id=B36861.15648798861975 (code B ref 36861); Sun, 04 Aug 2019 00:52:02 +0000 Original-Received: (at 36861) by debbugs.gnu.org; 4 Aug 2019 00:51:26 +0000 Original-Received: from localhost ([127.0.0.1]:60234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu4k9-0000Vn-MT for submit@debbugs.gnu.org; Sat, 03 Aug 2019 20:51:26 -0400 Original-Received: from sonic314-20.consmr.mail.ir2.yahoo.com ([77.238.177.146]:38867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hu4k6-0000VY-7X for 36861@debbugs.gnu.org; Sat, 03 Aug 2019 20:51:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1564879876; bh=d7ljeWpJsyMMi5y3PVTopb54LJFbE2uJL13C9NNLdcc=; h=Date:In-Reply-To:References:Subject:To:From:From:Subject; b=o7OcwXfa9vgaEMsAN+GwTkHZQ3cAJvFUXG5A0BlAd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117deiv2DFBC1l4K0bMyJUxFKgkhnHiTy2fmv0MyrmGDBK545NRhfzDmpuvgfqtjU9xNhb8yM CokE54HgbyR_Or8c05vP3.hF9qXpzYjjVNASkxuK.d Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sun, 4 Aug 2019 00:51:16 +0000 Original-Received: by smtp421.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 88ef3f9471dfa8bf76ff0090f55ed85c; Sun, 04 Aug 2019 00:51:11 +0000 (UTC) In-Reply-To: <87sgqhricg.fsf@mail.linkov.net> 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: 209.51.188.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:164517 Archived-At: ------0F9DPDWAX8IA9A0W87OY0QCMRKVV10 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, sorry, I don't understand actually why is so complex this provided code= in the email=2E The initialization for display-fill-column-indicator makes= some checks to set the default character as described in the documentation= , so no extra code is needed for that in the user side=2E In the initialization I see in this mail, they just set the column's value= to 78 which can be done also using the variable fill-column for the whole = major mode too=2E And actually dfci will recognize it by default and other = functionalities too so in the general scenario is better to use that one=2E (setq fill-column 78) (display-fill-column-indicator t) Should work no matters the order=2E Maybe as you were setting the mode's v= ariable instead of calling the function with the same name; the mode was no= t properly initialized=2E=20 On August 4, 2019 12:31:59 AM GMT+02:00, Juri Linkov w= rote: >>> >> (log-edit-mode =2E ((log-edit-font-lock-gnu-style =2E t) >>> >> - (log-edit-setup-add-author =2E t))) >>> >> + (log-edit-setup-add-author =2E t) >>> >> + (display-fill-column-indicator-column =2E 78) >>> >> + (eval =2E >(display-fill-column-indicator-mode)))) >>> > >>> > This will cause an annoying message and prompt when editing Emacs >>> > sources with an Emacs which doesn't yet have >>> > display-fill-column-indicator-mode, right? Can we avoid that? I >>> > routinely need to work on the latest sources with an older Emacs=2E >>>=20 >>> Shouldn't local-variables functions ignore undefined variables and >commands? >>> Probably not, since such change won't help for older versions=2E >> >> Right, and we cannot summarily allow any variables a given Emacs >> doesn't know about, that'd we unsafe=2E > >Actually by using the word "ignore" I meant to not set an unbound >variable >(currently `hack-local-variables' defines and sets unbound variables)=2E >But this is not backward-compatible change=2E > >>> Then one way is to put such lines to the init file >>> to avoid typing `y' to confirm local variables >>> while using emacs-26 to commit emacs-27 changes: >> >> Rather than requiring users of older Emacsen to change their init >> files in such strange ways, which will/might be a problem when they >> upgrade to Emacs 27, why not expect users who want the early >detection >> of long lines to turn on display-fill-column-indicator-mode in their >> init files? IOW, the solution that requires changes to one's init >> files goes both ways=2E > >I don't understand why display-fill-column-indicator customization >should be more complicated than necessary? Why it requires adding >these lines: > > (display-fill-column-indicator-column =2E 78) > (eval =2E (display-fill-column-indicator-mode)) > >when it should be enough to avoid eval by: > > (display-fill-column-indicator-column =2E 78) > (display-fill-column-indicator =2E t) > >Is it because the only purpose of display-fill-column-indicator-mode >is to set display-fill-column-indicator-character? But then why >display-fill-column-indicator-character is not nil by default? >This contradicts the docstring of >display-fill-column-indicator-character >that says that the default is U+2502, but actually the default is nil=2E > >I'm CC-ing the author of display-fill-column-indicator: >Could you please consider setting the default value of >display-fill-column-indicator-character? This could >simplify customization=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E ------0F9DPDWAX8IA9A0W87OY0QCMRKVV10 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, sorry, I don't understand actually why is so c= omplex this provided code in the email=2E The initialization for display-fi= ll-column-indicator makes some checks to set the default character as descr= ibed in the documentation, so no extra code is needed for that in the user = side=2E
In the initialization I see in this mail, they just set the colu= mn's value to 78 which can be done also using the variable fill-column for = the whole major mode too=2E And actually dfci will recognize it by default = and other functionalities too so in the general scenario is better to use t= hat one=2E

(setq fill-column 78)
(display-fill-column-indicator t= )


Should work no matters the order=2E Maybe as you were setting = the mode's variable instead of calling the function with the same name; the= mode was not properly initialized=2E



On August 4, 2019 12:31:59 AM GMT+02:00, Juri Linkov <juri@linkov= =2Enet> wrote:
(log= -edit-mode =2E ((log-edit-font-lock-gnu-style =2E t)
- = (log-edit-setup-add-author =2E t)))
+ (log-edit-setup= -add-author =2E t)
+ (display-fill-column-indicator-co= lumn =2E 78)
+ (eval =2E (display-fill-column-indicato= r-mode))))

This will cause an annoying message and pro= mpt when editing Emacs
sources with an Emacs which doesn't yet have
= display-fill-column-indicator-mode, right? Can we avoid that? I
rout= inely need to work on the latest sources with an older Emacs=2E

Shouldn't local-variables functions ignore undefined variables and= commands?
Probably not, since such change won't help for older versions= =2E

Right, and we cannot summarily allow any variables= a given Emacs
doesn't know about, that'd we unsafe=2E
=
Actually by using the word "ignore" I meant to not set an unbound varia= ble
(currently `hack-local-variables' defines and sets unbound variables= )=2E
But this is not backward-compatible change=2E

Then one way is to put such lines to the init file
to avoid ty= ping `y' to confirm local variables
while using emacs-26 to commit emacs= -27 changes:

Rather than requiring users of older Emac= sen to change their init
files in such strange ways, which will/might b= e a problem when they
upgrade to Emacs 27, why not expect users who wan= t the early detection
of long lines to turn on display-fill-column-indi= cator-mode in their
init files? IOW, the solution that requires change= s to one's init
files goes both ways=2E

I don't und= erstand why display-fill-column-indicator customization
should be more c= omplicated than necessary? Why it requires adding
these lines:

= (display-fill-column-indicator-column =2E 78)
= (eval =2E (display-fill-column-indicator-mode))

when it s= hould be enough to avoid eval by:

(display-fill-c= olumn-indicator-column =2E 78)
(display-fill-column-i= ndicator =2E t)

Is it because the only purpose of display-fill-colum= n-indicator-mode
is to set display-fill-column-indicator-character? But= then why
display-fill-column-indicator-character is not nil by default?=
This contradicts the docstring of display-fill-column-indicator-charact= er
that says that the default is U+2502, but actually the default is nil= =2E

I'm CC-ing the author of display-fill-column-indicator:
Could= you please consider setting the default value of
display-fill-column-in= dicator-character? This could
simplify customization=2E

--
Sent from my Android device with K-9 Mail=2E Please= excuse my brevity=2E ------0F9DPDWAX8IA9A0W87OY0QCMRKVV10--