From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27899: 26.0.50; dired-align-file forget about text properties Date: Tue, 01 Aug 2017 16:33:18 +0900 Message-ID: <871sovkaip.fsf@calancha-pc> References: <8760e7kat3.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501572862 4849 195.159.176.226 (1 Aug 2017 07:34:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Aug 2017 07:34:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 27899@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 01 09:34:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcRgz-0000rz-UJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Aug 2017 09:34:14 +0200 Original-Received: from localhost ([::1]:34874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcRh2-0005tm-Vb for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Aug 2017 03:34:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcRgt-0005tS-M5 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:34:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcRgo-0006T6-Jt for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:34:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcRgo-0006Sa-GV for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcRgo-0003qv-48 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Aug 2017 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27899 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27899-submit@debbugs.gnu.org id=B27899.150157280914769 (code B ref 27899); Tue, 01 Aug 2017 07:34:02 +0000 Original-Received: (at 27899) by debbugs.gnu.org; 1 Aug 2017 07:33:29 +0000 Original-Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcRgG-0003q8-Vt for submit@debbugs.gnu.org; Tue, 01 Aug 2017 03:33:29 -0400 Original-Received: from mail-pf0-f172.google.com ([209.85.192.172]:35092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcRgF-0003pp-OK for 27899@debbugs.gnu.org; Tue, 01 Aug 2017 03:33:28 -0400 Original-Received: by mail-pf0-f172.google.com with SMTP id t86so4500066pfe.2 for <27899@debbugs.gnu.org>; Tue, 01 Aug 2017 00:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=FhGEdoVhX1QtKT8LsZ8lu7VcEFWI6NpCdLGxymkWb6g=; b=aKMRFfXnuWIICd3rrt4d5YQIXoJw1ULv985YXCFXbvFGCCzQbVkEcMbXtnzwuAJwWs KMVQfjO8AbEDp3Bi6EDohNRwEhnRIXi+Osw0P42yB++3oC3VRgsRcJXp6TMTKGyC5QJV q92aLa/uFs3g/UwPZHBWSkTs7t+Gs60EcoHDMGP3vuUIL+NdKafE9JSDwqUEaeJvb0Nh uCuoOcl3XNjPbhF01b391sZbxo8AbcwrSurJ3JlfmlI9X+R45BmpquqE5H/epQ2/JHs3 KddPOmqvLmTXGol6c4DLrejJNP7RqVL/xlnNfzyp7kN+WI0gtQOmFwqnZRSS709LQmKK ZI9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FhGEdoVhX1QtKT8LsZ8lu7VcEFWI6NpCdLGxymkWb6g=; b=kcm+2aDkcd3EnZbpGE54L6LedHhcsWvHigNI6lO9jyO4P6s+Y7UsaFYyccv+t1mIA4 wIyl2IEnrqfCJkRACXVhP8BMZXuEuwmJf4HXW5CgTFMhOoGN3F4ts/sxYXeQ2hGiW2L7 +9Xrx49nYfoY4jJgvveOwt3em2VEtZC26oB9zPyQlhtJfN+/ctIiJXrU0m1eyD1R8pX6 dpbqjdPlrNVOz7dTXBKNyvQ8at1nCQHDPkE/hyV26c4gKGJk7d7ldgxYfGlXqo0deN2M Gutn6zJxeLkZxJFyqn5vU+tBkAEO46SX3gdRCeN7Qpwf+c/+QjZgcWVcv62XsK2zP4AB kdpA== X-Gm-Message-State: AIVw112mK5EJOXIxVeuTdiiFDe8i4s5atDoFH2w0HqSg7ycXnWZXjksg KRyGY09St5t9aVMC X-Received: by 10.84.140.3 with SMTP id 3mr20655543pls.374.1501572801687; Tue, 01 Aug 2017 00:33:21 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id x1sm1554569pgt.82.2017.08.01.00.33.20 for <27899@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2017 00:33:21 -0700 (PDT) In-Reply-To: <8760e7kat3.fsf@calancha-pc> (Tino Calancha's message of "Tue, 01 Aug 2017 16:27:04 +0900") 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: 208.118.235.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:135208 Archived-At: Tino Calancha writes: > +(ert-deftest dired-test-bug27899 () > + "Test for http://debbugs.gnu.org/27899 ." > + :expected-result :failed > + (let* ((dir (expand-file-name "src" source-directory)) > + (buf (dired (list dir "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c"))) > + (orig dired-hide-details-mode)) > + (dired-goto-file (expand-file-name "cygw32.c")) > + (forward-line 0) > + (let ((inhibit-read-only t)) > + (dired-align-file (point) (point-max))) > + (dired-hide-details-mode t) > + (dired-move-to-filename) > + (should (eq 2 (current-column))))) > > (provide 'dired-tests) > ;; dired-tests.el ends here The test must pass and set dired-hide-details-mode to orig at the end: diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index d6fe839708..937386de78 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -319,6 +319,21 @@ (delete-directory dir 'recursive) (when (buffer-live-p buf) (kill-buffer buf))))) +(ert-deftest dired-test-bug27899 () + "Test for http://debbugs.gnu.org/27899 ." + (let* ((dir (expand-file-name "src" source-directory)) + (buf (dired (list dir "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c"))) + (orig dired-hide-details-mode)) + (dired-goto-file (expand-file-name "cygw32.c")) + (forward-line 0) + (unwind-protect + (progn + (let ((inhibit-read-only t)) + (dired-align-file (point) (point-max))) + (dired-hide-details-mode t) + (dired-move-to-filename) + (should (eq 2 (current-column)))) + (dired-hide-details-mode orig)))) (provide 'dired-tests) ;; dired-tests.el ends here