From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: line-line-move-visual: was line motion problem Date: Mon, 21 Jul 2008 20:05:22 -0300 Message-ID: <48851632.5030302@ig.com.br> References: <18557.63556.231489.523637@gargle.gargle.HOWL> <5F62534C-D5CE-4364-8F73-E1AE0D61B4E2@gmail.com> <87abghlqs2.fsf@stupidchicken.com> <87hcap3ct7.fsf@stupidchicken.com> <87mykg84aj.fsf@stupidchicken.com> <200807181530.m6IFUHVp029662@sallyv1.ics.uci.edu> <06ED973A-F762-4586-9913-37B3622C8644@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216681408 27407 80.91.229.12 (21 Jul 2008 23:03:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2008 23:03:28 +0000 (UTC) Cc: Chong Yidong , raman@users.sourceforge.net, Dan Nicolaescu , Stefan Monnier , emacs-devel@gnu.org, Miles Bader To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 01:04:15 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KL4QH-0000U8-F8 for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2008 01:04:05 +0200 Original-Received: from localhost ([127.0.0.1]:34995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL4PO-0005J6-Bf for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 19:03:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL4PI-0005G3-G0 for emacs-devel@gnu.org; Mon, 21 Jul 2008 19:03:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL4PF-0005CU-Oq for emacs-devel@gnu.org; Mon, 21 Jul 2008 19:03:03 -0400 Original-Received: from [199.232.76.173] (port=41115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL4PF-0005C7-IT for emacs-devel@gnu.org; Mon, 21 Jul 2008 19:03:01 -0400 Original-Received: from yw-out-1718.google.com ([74.125.46.157]:17282) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KL4PE-0000dk-V7 for emacs-devel@gnu.org; Mon, 21 Jul 2008 19:03:01 -0400 Original-Received: by yw-out-1718.google.com with SMTP id 9so631224ywk.66 for ; Mon, 21 Jul 2008 16:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=2XxXiazILT5qw3xCYlJZE1JOwm73NwFtIKzS7TUAMuw=; b=m/EgjbsnTCdRzwIXXNUifG0HP6hBw+POgCznFwXWqXySp8kuvFyAeZnVkWV1a+1tiP T3V9Cmzx+6SF2UxWt9FiWe4xlnIqmmXu55tjAtIy0Vdj3TApL1BHijtDdqLqCg5nLBB5 eV07+in7zghGY7gpiWEhmGsI12AtmBTl5CanE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=BkKhagnX9Lm3/f5Y+KY4fSz3Guk/e/t+OQjK+Y1+Yq8m83D2tcW3/Q8i6yXozk1rcg TFQh7hfgqTWwLzBdU8tCAXlso1P99hnLQi20vL61pfOhsMGfrLhwAOTQ7JhrnOLBgN+t ez4VbRhGjUSLf0I/kNZxQKhWw0BCUkrc+PuXU= Original-Received: by 10.150.49.1 with SMTP id w1mr4538281ybw.25.1216681379653; Mon, 21 Jul 2008 16:02:59 -0700 (PDT) Original-Received: from ?192.168.0.100? ( [201.82.41.56]) by mx.google.com with ESMTPS id i49sm2034024rne.0.2008.07.21.16.02.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 21 Jul 2008 16:02:59 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.15) Gecko/20080620 SeaMonkey/1.1.10 In-Reply-To: <06ED973A-F762-4586-9913-37B3622C8644@gmail.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101140 Archived-At: David Reitter wrote: > On 21 Jul 2008, at 00:49, Chong Yidong wrote: >> If anyone on this list has a patch that is still waiting for approval or >> further comments, now would be a good time to ping. > > > OK, there is still the paragraph marking function. The following two > major items (and some smaller issues) have been addressed: > > Stefan Monnier: > >> My font doesn't seem to know the char 2230, and UnicodeData.txt doesn't >> seem to know that char either. So we should probably use something >> else. > > On 18 Jul 2008, at 11:30, Dan Nicolaescu wrote: >> >> whitespace.el already has many many ways of dealing with whitespaces, >> wouldn't this mode be a better fit in whitespace.el? > > > Any objections to the patch below. > Can't put it in simple.el because make-glyph-code can't be autoloaded, > and the code is probably happy in whitespace.el. > > - D I have objections to this patch. > *** whitespace.el 06 May 2008 03:57:59 -0400 1.80 > --- whitespace.el 21 Jul 2008 11:04:45 -0400 > *************** > *** 2352,2357 **** > --- 2352,2406 ---- > (whitespace-mode -1))) > nil) ; continue standard unloading > > + > + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > + > + > + > + ;; Show-newlines-mode > + (defface blank-newline > + '((((class color) (background dark)) > + (:foreground "lightgrey" :bold nil)) > + (((class color) (background light)) > + ( :foreground "lightgrey" :bold nil)) > + (t (:bold nil :underline t))) > + "Face used to visualize NEWLINE char mapping. > + > + See `blank-display-mappings'." > + :group 'blank) First of all, there is no more blank package, it was replaced by whitespace package. Second, there is already whitespace-newline which is the face used to visualize newlines. > + > + (defvar show-newlines-newline-code > + (vector (make-glyph-code 182 'blank-newline) 10)) No need for this, please, see whitespace-display-mappings option documentation. > + > + ;;;###autoload > + (define-minor-mode show-newlines-mode > + "Mark newlines in current buffer" > + :group 'convenience > + > + (unless buffer-display-table > + (setq buffer-display-table > + (or standard-display-table (make-display-table)))) > + (aset buffer-display-table 10 > + (if show-newlines-mode show-newlines-newline-code))) > + > + ;;;###autoload > + (define-minor-mode global-show-newlines-mode > + "Mark newlines in all buffers" > + :group 'convenience > + :global t > + > + (unless standard-display-table > + (setq standard-display-table (make-display-table))) > + (if global-show-newlines-mode > + (aset standard-display-table 10 show-newlines-newline-code) > + (aset standard-display-table 10 nil)) > + (dolist (buffer (buffer-list)) > + (with-current-buffer buffer > + (if buffer-display-table > + (show-newlines-mode > + (if global-show-newlines-mode 1 -1)))))) > + > + > > (provide 'whitespace) Again, no need for all of these functions. If it is necessary to have specific functions to display newlines, it should be something like this: (defun whitespace-newline () (let ((whitespace-style '(newline-mark newline))) (whitespace-mode 1))) (defun global-whitespace-newline () (let ((whitespace-style '(newline-mark newline))) (global-whitespace-mode 1))) > *** menu-bar.el 10 Jul 2008 00:27:23 -0400 1.341 > --- menu-bar.el 21 Jul 2008 11:45:01 -0400 > *************** > *** 653,659 **** > (let ((need-save nil)) > ;; These are set with menu-bar-make-mm-toggle, which does not > ;; put on a customized-value property. > ! (dolist (elt '(line-number-mode column-number-mode > size-indication-mode > cua-mode show-paren-mode transient-mark-mode > blink-cursor-mode display-time-mode display-battery-mode)) > (and (customize-mark-to-save elt) > --- 653,660 ---- > (let ((need-save nil)) > ;; These are set with menu-bar-make-mm-toggle, which does not > ;; put on a customized-value property. > ! (dolist (elt '(global-show-newlines-mode line-number-mode > ! column-number-mode size-indication-mode > cua-mode show-paren-mode transient-mark-mode > blink-cursor-mode display-time-mode display-battery-mode)) > (and (customize-mark-to-save elt) > *************** > *** 700,705 **** > --- 701,714 ---- > > (defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide")) > > + (define-key menu-bar-showhide-menu [show-newlines-mode] > + (menu-bar-make-mm-toggle global-show-newlines-mode > + "Show Newlines" > + "Show hard newlines")) > + > + (define-key menu-bar-showhide-menu [newlines-separator] > + '("--")) > + > (define-key menu-bar-showhide-menu [column-number-mode] > (menu-bar-make-mm-toggle column-number-mode > "Column Numbers" Why should the newline visualization be inserted into menu-bar? Vinicius