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:27:04 +0900 Message-ID: <8760e7kat3.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501572493 1011 195.159.176.226 (1 Aug 2017 07:28:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Aug 2017 07:28:13 +0000 (UTC) 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:28:09 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 1dcRb3-0008FU-Ts for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Aug 2017 09:28:06 +0200 Original-Received: from localhost ([::1]:34867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcRb9-0005AA-LE for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Aug 2017 03:28:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcRb3-0005A1-UZ for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcRb0-0003LC-OE for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:28:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcRb0-0003Km-KQ for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcRb0-0003gj-FT for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:28: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:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27899 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150157244214128 (code B ref -1); Tue, 01 Aug 2017 07:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2017 07:27:22 +0000 Original-Received: from localhost ([127.0.0.1]:36045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcRaM-0003fo-8b for submit@debbugs.gnu.org; Tue, 01 Aug 2017 03:27:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcRaK-0003fb-9X for submit@debbugs.gnu.org; Tue, 01 Aug 2017 03:27:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcRaE-0002vG-1N for submit@debbugs.gnu.org; Tue, 01 Aug 2017 03:27:15 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcRaD-0002v3-U8 for submit@debbugs.gnu.org; Tue, 01 Aug 2017 03:27:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcRaC-00058G-K3 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:27:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcRa9-0002qi-DS for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:27:12 -0400 Original-Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:35322) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcRa9-0002pU-6t for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2017 03:27:09 -0400 Original-Received: by mail-pg0-x22b.google.com with SMTP id v189so4587611pgd.2 for ; Tue, 01 Aug 2017 00:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=ImWlk4Z+Tny03NY1hFzYsWQlm9lC5qmmz7Fh+HiniV8=; b=I+GEx3BKOD7zY9jYzDDC4MIm05rHL8Gs3LSqJvXVBKHg6XPlZdcp6J+OkZpfaCkIBq VC1bQIqUutouI9/iKQ7C/I9BTHpVp74hpXJhtzSgvhly6ld22bHY6wvZo3dSoVzAFBQk KLFfkSzlaUqhXzpJMrIIWbDdX0ThxujU1btG1z+EUtR8Zqr3AQ0uz37Lj69h0DsEpGi6 hBqy7AjdhxP+9hFzYG4S3mEr8oMKMHQa27elZr4sxhXPme/aJWubwqSPLiVLJNvaGQTt OZdE5+KhZ8onZLD39SumJ5oFs+qUNOUhyw1QZq5Vy66zObGaHLOhITkiGQ1a4bPE5xIu a2Wg== 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:date:message-id:mime-version; bh=ImWlk4Z+Tny03NY1hFzYsWQlm9lC5qmmz7Fh+HiniV8=; b=HZz6aO7jRISZNlPlb8AcR3K4XZyTOuZO9EZUASOZuf4U5pFsoYYrvyVDN90oLrBSv7 3ySBOGpYSYZowE4h0biRYdREsCSjiTQsBRpBQUP8eAgQ5nKL7SJ/gIfHQY3w1EP+32os Tn8e3IyaJywFyDOvldvqec4Rgs7m1R8sdTWHv8sT1OLhW6+wGDw7KJWfTqst2Ar7ESNM s9CTrYuOxOG0E1/tWxG8u5UhfzZeRlsmhitWqGcJa24eqMA83jc2CXKjDYeMkv1DFMwc 7wTkmlHTOlw2p4EE6kgimQ7pNcKaMoqSNpHIOWfJHnjnGUaNc2Sv9/IuAsN346Z4uMNh Vbag== X-Gm-Message-State: AIVw112khYvf3FEJ0PuZi4xCMcvKEVSTX6TzhuMQrw+urk+dcuIyIojm aSze3nSQ6LB9rDA+ X-Received: by 10.98.7.204 with SMTP id 73mr18150512pfh.110.1501572428000; Tue, 01 Aug 2017 00:27:08 -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 v9sm33127020pgo.39.2017.08.01.00.27.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Aug 2017 00:27:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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.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:135207 Archived-At: The addes spaces must inherit the nearby text properties: for instance, the 'invisible' property. --8<-----------------------------cut here---------------start------------->8--- commit 556c5281d3b5056b9bf636b88ae3baf57a1d2f48 Author: Tino Calancha Date: Tue Aug 1 16:24:00 2017 +0900 dired-align-file: Inherit text properties in inserted spaces * lisp/dired.el (dired-align-file): Inherit text properties in inserted spaces (Bug#27899). * test/lisp/dired-tests.el (dired-test-bug27899): Add test. diff --git a/lisp/dired.el b/lisp/dired.el index c502dd8a50..f31993f367 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1162,7 +1162,7 @@ dired-align-file (setq file-col (+ spaces file-col)) (if (> file-col other-col) (setq spaces (- spaces (- file-col other-col)))) - (insert-char ?\s spaces) + (insert-char ?\s spaces 'inherit) ;; Let's just make really sure we did not mess up. (unless (save-excursion (eq (dired-move-to-filename) (marker-position file))) diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index d6fe839708..313381f22c 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -319,6 +319,19 @@ (delete-directory dir 'recursive) (when (buffer-live-p buf) (kill-buffer buf))))) +(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 --8<-----------------------------cut here---------------end--------------->8--- In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-07-31 Repository revision: 3a8d0cc825635e07da2a90c4ac987b476fc9b05d