unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christoph Arenz <tiga.arenz@web.de>
To: 43587@debbugs.gnu.org
Subject: bug#43587: move-to-column behaves differently when text has invisible property
Date: Tue, 29 Sep 2020 17:56:45 +0200	[thread overview]
Message-ID: <c45bfd09-1574-49c8-ad04-5e5f0bcdd1da@web.de> (raw)
In-Reply-To: <7e243d01-6d98-bda3-94bf-c0841a32f4ac@web.de>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

Digging deeper into bug 43587, it seems to be related to move-to-column
behaving slightly different when the text in a line has the invisible
property set.

Here is how to recreate. According to the documentation for
move-to-column, I would not expect any difference between the two lines:

 > Optional second argument FORCE non-nil means if COLUMN is in the
middle of a tab character, change it to spaces.

For the first line, the tab has not been changed to spaces...

Am I overlooking something?

Kind Regards,
Christoph

(progn
   (switch-to-buffer "indent-test.txt")
   (erase-buffer)
   (insert "\tLine starting with INVISIBLE text after TAB\n")
   (insert "\tLine starting with visible text after TAB\n")
   (insert "\nUsing move-to-column to move 'into' TAB, using the FORCE
parameter on both lines\n")
   (whitespace-mode 1)
   (add-text-properties 2 21 '(invisible t))
   (beginning-of-buffer)
   (move-to-column 7 t)
   (forward-line)
   (move-to-column 7 t))


[-- Attachment #2: Type: text/html, Size: 1452 bytes --]

  reply	other threads:[~2020-09-29 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 10:23 bug#43587: 27.1; Org is breaking links Christoph Arenz
2020-09-29 15:56 ` Christoph Arenz [this message]
2020-09-29 16:22   ` bug#43587: move-to-column behaves differently when text has invisible property Eli Zaretskii
     [not found]     ` <f6f19f79-702b-9e98-b297-234a7b2d9f20@web.de>
2020-09-29 16:50       ` Eli Zaretskii
2020-09-29 19:00   ` Eli Zaretskii
2020-09-30 14:35     ` Eli Zaretskii
2020-10-06 16:01       ` Christoph Arenz
2020-10-06 16:11         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c45bfd09-1574-49c8-ad04-5e5f0bcdd1da@web.de \
    --to=tiga.arenz@web.de \
    --cc=43587@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).