From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: invisibility in info
Date: Sun, 15 Jun 2003 21:37:44 -0500 (CDT) [thread overview]
Message-ID: <200306160237.h5G2biA08226@eel.dms.auburn.edu> (raw)
>From an old message of Stefan:
I think we should solve the above as follows:
Instead of marking lines as:
* CVS:(cvs). The CVS thingy.
^^^^^^^^^^^^^^^^^^^^^^^^
(display " ")
we should mark them as follows:
* CVS:(cvs). The CVS thingy.
^^^^^^^ ^^^^^^^^^^^^^^^^
invisible (display (space :align-to 24))
This concerned treatment of invisible text in Info. Stefan
essentially implemented this, with some minor adjustments. While
Stefan's change constituted a big improvement over the previous
situation, there are still situations where the difference in
appearance between text yanked into an Emacs buffer and text yanked
into another application can be big enough to cause confusion. The
difference in whitespace can be huge, because all whitespace gets
handled by the display property and since that is handled by
:align-to, all whitespace often disappears when the invisible text
becomes visible. The result can look very ugly when yanking into
another Emacs buffer or when turning on vis-mode. The invisible
whitespace reappears when yanked into another buffer, saved to file,
printed out and so on.
I would like to commit the following patch, which does not make any
change to the normal appearance of an info buffer, except when
vis-mode is enabled or when yanked into another Emacs buffer. It can
be off by at most one space when compared to yanking into other
application and so on, whereas right now there is no limit as to how
much it can be off.
Essentially it handles all involved text, except the very last space
by the invisibility property and gives the last space the same display
properties Stefan gave to the entire stretch of whitespace.
Is it OK if I commit this patch?
===File ~/infodiff==========================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/info.old.el /usr/local/share/emacs/21.3.50/lisp/info.el
*** /usr/local/share/emacs/21.3.50/lisp/info.old.el Mon Jun 9 22:04:07 2003
--- /usr/local/share/emacs/21.3.50/lisp/info.el Fri Jun 13 21:30:32 2003
***************
*** 2946,2956 ****
'(font-lock-face info-xref
mouse-face highlight))))
(when (eq Info-hide-note-references t)
! (put-text-property (match-beginning 2) (match-beginning 4)
'invisible t)
;; We need a stretchable space like :align-to but with
;; a minimum value.
! (put-text-property (match-beginning 4) (match-end 4) 'display
(if (>= 22 (- (match-end 1)
(match-beginning 0)))
'(space :align-to 24)
--- 2946,2956 ----
'(font-lock-face info-xref
mouse-face highlight))))
(when (eq Info-hide-note-references t)
! (put-text-property (match-beginning 2) (1- (match-end 4))
'invisible t)
;; We need a stretchable space like :align-to but with
;; a minimum value.
! (put-text-property (1- (match-end 4)) (match-end 4) 'display
(if (>= 22 (- (match-end 1)
(match-beginning 0)))
'(space :align-to 24)
***************
*** 2958,2964 ****
(setq cont (looking-at "."))
(while (and (= (forward-line 1) 0)
(looking-at "\\([ \t]+\\)[^*\n]"))
! (put-text-property (match-beginning 1) (match-end 1) 'display
(if cont
'(space :align-to 26)
'(space :align-to 24)))
--- 2958,2967 ----
(setq cont (looking-at "."))
(while (and (= (forward-line 1) 0)
(looking-at "\\([ \t]+\\)[^*\n]"))
! (put-text-property (match-beginning 1) (1- (match-end 1))
! 'invisible t)
! (put-text-property (1- (match-end 1)) (match-end 1)
! 'display
(if cont
'(space :align-to 26)
'(space :align-to 24)))
Diff finished at Sun Jun 15 20:52:40
============================================================
next reply other threads:[~2003-06-16 2:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-16 2:37 Luc Teirlinck [this message]
2003-06-17 3:12 ` invisibility in info Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200306160237.h5G2biA08226@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.