From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: fill length of visual line mode Date: Sat, 04 Oct 2014 18:25:33 -0400 Message-ID: References: <87oatu6hfn.fsf@kanis.fr> <87oatu6hfn.fsf@kanis.fr> <87vbo0ga6i.fsf_-_@kanis.fr> <87egunvrqh.fsf@kanis.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412461576 2759 80.91.229.3 (4 Oct 2014 22:26:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2014 22:26:16 +0000 (UTC) Cc: Eli Zaretskii , Emacs Development List To: Ivan Kanis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 05 00:26:09 2014 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 1XaXmD-0005RF-8N for ged-emacs-devel@m.gmane.org; Sun, 05 Oct 2014 00:26:09 +0200 Original-Received: from localhost ([::1]:45518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaXmC-0000fR-PJ for ged-emacs-devel@m.gmane.org; Sat, 04 Oct 2014 18:26:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaXlt-0000fK-Ix for emacs-devel@gnu.org; Sat, 04 Oct 2014 18:25:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaXlm-0005Yg-4S for emacs-devel@gnu.org; Sat, 04 Oct 2014 18:25:49 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaXld-0005Sz-05; Sat, 04 Oct 2014 18:25:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91685450" Original-Received: from 69-196-168-232.dsl.teksavvy.com (HELO ceviche.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Oct 2014 18:25:28 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 6277166094; Sat, 4 Oct 2014 18:25:33 -0400 (EDT) In-Reply-To: <87egunvrqh.fsf@kanis.fr> (Ivan Kanis's message of "Sat, 04 Oct 2014 16:23:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:174973 Archived-At: > Let's forget about the code I posted. It's a stupid hack that works for me. >>> It just feels hackish and wrong. The right thing I feel is to use >>> fill-column. >> But it does beg the question: what if the window is smaller than >> fill-column? Should it then fill at the window's edge or should it >> continue as if truncate-lines is set? > I didn't think of that. I bet users will want either. So a variable > will say what to do. I think pursuing the window-configuration-change-hook path is actually a good idea: if we can get the desired behavior via Elisp code, it's generally preferable (the C code is hairy enough as it is). It also makes it easier to offer configurability (e.g. to choose whether to center the visible text in the window, or not). Stefan