From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.bugs Subject: bug#6799: 24.0.50; Please add dired-details.el to Emacs [patch] Date: Mon, 11 Feb 2013 08:19:52 +0000 (GMT) Message-ID: <87mwvbuus2@ch.ristopher.com> References: <9C9137560F644E759AD573BBBD8E59EF@us.oracle.com> <5EA47A0255F8494DB430B52D46876641@us.oracle.com> <65D921448B0644988BE6445A2EF3E021@us.oracle.com> <21FFB8EA85964411A9B790386C5DA3AD@us.oracle.com> <878v8zow44@ch.ristopher.com> <87k3sj6juj@ch.ristopher.com> <87mwxcx149@ch.ristopher.com> <87wqugmcu8@ch.ristopher.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360570853 6485 80.91.229.3 (11 Feb 2013 08:20:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 08:20:53 +0000 (UTC) To: 6799@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 11 09:21:14 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1U4odV-0003mb-BX for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Feb 2013 09:21:13 +0100 Original-Received: from localhost ([::1]:60763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4odC-0001ZT-0k for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Feb 2013 03:20:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4od5-0001ZN-39 for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:20:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4od2-0004CV-9P for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:20:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4od2-0004CP-5O for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:20:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U4odJ-0007Xd-Vc for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Schmidt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Feb 2013 08:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136057083328953 (code B ref -1); Mon, 11 Feb 2013 08:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Feb 2013 08:20:33 +0000 Original-Received: from localhost ([127.0.0.1]:49779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4ocq-0007Wv-Lc for submit@debbugs.gnu.org; Mon, 11 Feb 2013 03:20:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51214) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4ocn-0007Wl-Gn for submit@debbugs.gnu.org; Mon, 11 Feb 2013 03:20:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4ocN-0003jp-KV for submit@debbugs.gnu.org; Mon, 11 Feb 2013 03:20:10 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:42101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ocN-0003jh-Hp for submit@debbugs.gnu.org; Mon, 11 Feb 2013 03:20:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ocI-0001So-PZ for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:20:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U4ocF-0003e4-S4 for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:19:58 -0500 Original-Received: from ristopher.com ([146.185.21.93]:55288 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U4ocF-0003du-Gk for bug-gnu-emacs@gnu.org; Mon, 11 Feb 2013 03:19:55 -0500 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id F418820AA2; Mon, 11 Feb 2013 08:19:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1360570793; bh=p8lcPxTYq492OwUp5rRgfJ7cp1dO8CMsQFq3w8fQQG4=; h=From:To:Subject:In-Reply-To:Message-ID:References:MIME-Version: Content-Type:Date; b=DNPmf91Nhqc60SvrJ5LKt4wwA+/Gpsaak+JOM4oMCdZt88TcQkZgQ8q4BB7G4EFHi ZW7lNY6BplnvN1rb21LwQS5kz22ts5uiKWQ6bbbF1+UFkvcunv2w6tXBpyLgYrj03p 84ugI2I5BHsRTb8qNnYmFLxoySJcIqBV9nKbkeqg= In-Reply-To: (Stefan Monnier's message of "Sun, 10 Feb 2013 22:37:53 -0500") Mail-Followup-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71045 Archived-At: Stefan Monnier writes: >> (forward-line arg) >> + (while (and (progn >> + (while (and (< arg 0) >> + (bolp) >> + (/= (1+ (point)) (point-max)) >> + (eq (get-text-property (1+ (point)) 'invisible) >> + 'dired-hide-details-information)) >> + (forward-char -1)) >> + (invisible-p (point))) >> + (let ((p (funcall (if (> arg 0) >> + 'next-single-property-change >> + 'previous-single-property-change) >> + (point) >> + 'invisible))) >> + (when p >> + (goto-char p) >> + t)))) >> (dired-move-to-filename)) > > What is this for? dired-(next|previous)-line use (forward|backward)-line for point movement. These functions ignore hidden lines and subsequent point movement by the editing loop does not do the right thing when point moves backwards over a hidden line. (defvar use-case 0) (with-selected-window (or (get-buffer-window "*moose*") (progn (split-window-below))) (switch-to-buffer (get-buffer-create "*moose*")) (erase-buffer) (insert "Header\n" (propertize "Hidden\n" 'invisible t) "Stuff") (cl-ecase use-case (0 (goto-char (point-min)) (forward-line 1)) (1 (goto-char (point-max)) (forward-line -1)) (2 (goto-char (point-min)) (next-line 1)) (3 (goto-char (point-max)) (next-line -1))) (prog1 use-case (setq use-case (% (1+ use-case) 4)))) Put that in scratch, eval the first form, eval the second form four times in a row. Use case 1 does not work. The change you cited tries to work around this problem in dired. I do not know whether dired-(next|previous)-line should use (next|previous)-line with nil-bound line-move-visual. AFAICT (next|previous)-line do not do the right thing either. >> + (if (derived-mode-p 'locate-mode) >> + (setq dired-hide-details-mode nil) > > Could you explain why locate-mode needs such special treatment (here > and in locate-mode-map)? I'm mostly worried here that maybe some > other mode might require similar treatment. The buffer generated by M-x locate RET does not contain any "details" to hide. dired-hide-details-mode would be a no-op there. Locate buffers are not real dired buffer. locate-mode is an independent major mode whose keymap derives from dired-mode-map. locate runs dired-mode-hook despite the current buffer not being derived from dired-mode. I think ignoring locate is better than complaining that dired-hide-details-mode is enabled in a buffer that is not derived from dired-mode. I am not aware of any other mode that behaves that way. Christopher