From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Felix -" Newsgroups: gmane.emacs.bugs Subject: bug#342: kill-line sometimes unexpectedly kills invisible text Date: Sat, 31 May 2008 13:57:01 -0700 Message-ID: <433125f80805311357ua664d33o59c682ceb215d6c5@mail.gmail.com> Reply-To: Felix - , 342@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1212283256 31658 80.91.229.12 (1 Jun 2008 01:20:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Jun 2008 01:20:56 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 01 03:21:37 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K2cGM-000804-JA for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jun 2008 03:21:34 +0200 Original-Received: from localhost ([127.0.0.1]:42876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2cFa-000748-Lm for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2008 21:20:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2YMf-0007Ym-DY for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 17:11:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2YMd-0007Xl-Jk for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 17:11:48 -0400 Original-Received: from [199.232.76.173] (port=44951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2YMd-0007Xg-6S for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 17:11:47 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34542) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K2YMc-0002e0-P1 for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 17:11:47 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4VLBjJc010929; Sat, 31 May 2008 14:11:45 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m4VL56OY008727; Sat, 31 May 2008 14:05:06 -0700 X-Loop: don@donarmstrong.com Resent-From: "Felix -" Original-Sender: grayscale@gmail.com Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 31 May 2008 21:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 342 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12122674316666 (code B ref -1); Sat, 31 May 2008 21:05:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 31 May 2008 20:57:11 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4VKv4DB006660 for ; Sat, 31 May 2008 13:57:06 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2Y8O-00011U-IR for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 16:57:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2Y8M-000115-UA for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 16:57:03 -0400 Original-Received: from [199.232.76.173] (port=52623 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2Y8M-000112-OS for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 16:57:02 -0400 Original-Received: from an-out-0708.google.com ([209.85.132.242]:47888) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2Y8M-0000Sd-Ba for bug-gnu-emacs@gnu.org; Sat, 31 May 2008 16:57:02 -0400 Original-Received: by an-out-0708.google.com with SMTP id c38so131808ana.84 for ; Sat, 31 May 2008 13:57:01 -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:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=ZwgEulWajtetXIp2aN+F2ewqUVxb711DjmZU22RHusc=; b=mlqjljdbrNDEzbyf26HM5q0uCb8kSSwT4k/I9wb96oB0hcvT0B87sT4Q1JXTMCqPn7RkfcaAV6Gs9dHCCYTbGrX/Pl2kHfV3zhhAX0C5ayZDKa2bFwLnqmZ7iESSzGkP5ZL25CXkUAuZQuQCNRoAZZ4vG4PfpOAMb4cB88TamNk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=yHiVulvhaLgydQjyTNf5bEoLqerEF3yXuH3QkKQ+qk5Bch8KPOykazPog95XEiSxIgKYjsnBau3HoZ2MSZi9vVco3jINfXbEnUaoncQAnhXufiX0ywLXNs5/LWJQMBMUjE3eafST469fEANe6z4xuvrZy30WY6fbr3DpFTUoTu4= Original-Received: by 10.100.240.17 with SMTP id n17mr12002836anh.49.1212267421165; Sat, 31 May 2008 13:57:01 -0700 (PDT) Original-Received: by 10.100.229.11 with HTTP; Sat, 31 May 2008 13:57:01 -0700 (PDT) Content-Disposition: inline X-Google-Sender-Auth: 76c9ba50039d49b5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Sat, 31 May 2008 17:11:48 -0400 X-Mailman-Approved-At: Sat, 31 May 2008 21:20:41 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:18205 Archived-At: emacs-version "22.2.1" current line is visible, next line is invisible, I move to end of visible line, then type ctrl-k. I expect it to kill just the visible newline, and sometimes it does that, but sometimes it kills the invisible line too. what's annoying is, it's inconsistent in an unobvious way. the behavior depends on what's in the invisible text. the underlying problem: kill-line in that case uses forward-visible-line to find the end of the kill region. this code demonstrates the forward-visible-line problem: (with-current-buffer (get-buffer-create "*test*") (add-to-invisibility-spec '(foo . t)) (goto-char (point-max)) (insert "\n t1: invis ends with newline: abc\n" (propertize "def\n ghi\n" 'invisible 'foo) "\n jkl\n") (search-backward "abc") (insert "[") (forward-visible-line 1) (insert "]") (goto-char (point-max)) (insert "\n t2: invis doesn't end with newline: abc\n" (propertize "def\n ghi" 'invisible 'foo) "\n jkl\n") (search-backward "abc") (insert "[") (forward-visible-line 1) (insert "]") (pop-to-buffer (current-buffer)) ) when I run that, my *test* buffer ends up looking like this: t1: invis ends with newline: [abc ...] jkl t2: invis doesn't end with newline: [abc ]... jkl I don't really care whether it does t1 or t2, I just want it to be consistently t1 or t2.