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 22:30:05 +0200 Message-ID: <04C790C7-2667-4480-BDC9-BE838D307A74@aol.com> References: <875znjntfe.fsf@mail.linkov.net> <83mugvhr66.fsf@gnu.org> <871ry6rksu.fsf@mail.linkov.net> <83zhksexvx.fsf@gnu.org> <87sgqhricg.fsf@mail.linkov.net> <87o914u65x.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----9EEVRQDT6Q2YY3GD1MP72ZQ6UH4JV9" Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="29670"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: K-9 Mail for Android Cc: 36861@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 04 22:31:08 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 1huN9o-0007ce-9W for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 22:31:08 +0200 Original-Received: from localhost ([::1]:49456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huN9n-0002kE-AT for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 16:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35809) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huN9j-0002k8-6c for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 16:31:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1huN9h-0004rT-Qn for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 16:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1huN9h-0004rM-Ny for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 16:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1huN9h-0007FL-Jh for bug-gnu-emacs@gnu.org; Sun, 04 Aug 2019 16:31:01 -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 20:31:01 +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.156495064227822 (code B ref 36861); Sun, 04 Aug 2019 20:31:01 +0000 Original-Received: (at 36861) by debbugs.gnu.org; 4 Aug 2019 20:30:42 +0000 Original-Received: from localhost ([127.0.0.1]:34292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huN9N-0007Eg-FO for submit@debbugs.gnu.org; Sun, 04 Aug 2019 16:30:41 -0400 Original-Received: from sonic302-21.consmr.mail.ir2.yahoo.com ([87.248.110.84]:34261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huN9J-0007EM-Dh for 36861@debbugs.gnu.org; Sun, 04 Aug 2019 16:30:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1564950630; bh=1rZRmKdeOQzDicd4+ck1Rt6MKy4UCaoMOUiBLflg8sI=; h=Date:In-Reply-To:References:Subject:To:From:From:Subject; b=g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l7CLw8hnkXfNAzFo_4 T5Efkl2.Z.lKrAE3YMSFTEu6BkPCcf1r.vh2LtrIK9nI5xshDoOO_xPI_2YByUSY2x.IuxxWYVS8 .TMaIKok0aklU5Zcvd4Eu2eM.vvK5_hcXpry2r4KkU Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Sun, 4 Aug 2019 20:30:30 +0000 Original-Received: by smtp406.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID a34b447647d1668c41b7af5c8b99158a; Sun, 04 Aug 2019 20:30:28 +0000 (UTC) In-Reply-To: <87o914u65x.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:164595 Archived-At: ------9EEVRQDT6Q2YY3GD1MP72ZQ6UH4JV9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dfci was not designed to be used in this way, and the mode initialization a= ctually sets the character, but in the future it could make many other dyna= mic tests/checks if needed=2E So I don't think we should modify it to work = the other way you suggest, because for menit is not general enough=2E But I= will follow the Eli's suggestions in this aspects more than my own opinion= =2E=20 Any way, if you want to use the mode in this way (for now) you can/need to= set the display-fill-column-indicator-character to your desired value and = it should work as it is now=2E But I can't promise that it will work the sa= me way in the future=2E But again, probably Eli will suggest a better solution for your use case= =2E On August 4, 2019 9:39:06 PM GMT+02:00, Juri Linkov wr= ote: >> 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 >> variable instead of calling the function with the same name; the mode >> was not properly initialized=2E > >The problem is that is when the need is to enable dfci, it is simpler >to avoid eval to enable this mode because dfci works fine without using >dfci-mode, i=2Ee=2E when only variables are set in Local Variables: > > ;;; Local Variables: > ;;; display-fill-column-indicator: t > ;;; display-fill-column-indicator-column: 78 > ;;; End: > >or in =2Edir-locals=2Eel: > > (display-fill-column-indicator =2E t) > (display-fill-column-indicator-column =2E 78) > >But the display-fill-column-indicator-character can't be set >in Local Variables because its value depends on the current display: >either U+2502 or ?| if the font does not support Unicode characters=2E > >Do you think it would be possible to set the default value of >display-fill-column-indicator-character without calling >display-fill-column-indicator-mode? --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E ------9EEVRQDT6Q2YY3GD1MP72ZQ6UH4JV9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dfci was not designed to be used in this way, and = the mode initialization actually sets the character, but in the future it c= ould make many other dynamic tests/checks if needed=2E So I don't think we = should modify it to work the other way you suggest, because for menit is no= t general enough=2E But I will follow the Eli's suggestions in this aspects= more than my own opinion=2E
Any way, if you want to use the mode in th= is way (for now) you can/need to set the display-fill-column-indicator-char= acter to your desired value and it should work as it is now=2E But I can't = promise that it will work the same way in the future=2E
But again, proba= bly Eli will suggest a better solution for your use case=2E


On August 4, 2019 9:39:06 PM GMT+02:00, Juri Linkov = <juri@linkov=2Enet> wrote:
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 mak= es
some checks to set the default character as described in the documen= tation,
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<= br> major mode too=2E And actually dfci will recognize it by default and ot= her
functionalities too so in the general scenario is better to use tha= t 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; th= e mode
was not properly initialized=2E

The problem = is that is when the need is to enable dfci, it is simpler
to avoid eval = to enable this mode because dfci works fine without using
dfci-mode, i= =2Ee=2E when only variables are set in Local Variables:

;;; Local = Variables:
;;; display-fill-column-indicator: t
;;; display-fill-= column-indicator-column: 78
;;; End:

or in =2Edir-locals=2Eel:<= br>
(display-fill-column-indicator =2E t)
(display-fill-column-in= dicator-column =2E 78)

But the display-fill-column-indicator-charact= er can't be set
in Local Variables because its value depends on the curr= ent display:
either U+2502 or ?| if the font does not support Unicode ch= aracters=2E

Do you think it would be possible to set the default val= ue of
display-fill-column-indicator-character without calling
display= -fill-column-indicator-mode?

--
Sent fr= om my Android device with K-9 Mail=2E Please excuse my brevity=2E ------9EEVRQDT6Q2YY3GD1MP72ZQ6UH4JV9--