all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* longlines.el problems...
@ 2005-07-11 23:41 David Kastrup
  2005-07-12 17:05 ` Chong Yidong
  2005-07-21 13:59 ` Line wrapping during redisplay (was: longlines.el problems...) Kim F. Storm
  0 siblings, 2 replies; 9+ messages in thread
From: David Kastrup @ 2005-07-11 23:41 UTC (permalink / raw)


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


I just tried out longlines-mode with AUCTeX/preview-latex.  Cough,
cough.  One problem that it has is that it does not preserve markers
around spaces/newlines.

Emacs' fill modes have got this right by now, in contrast.  The main
trick is that if one replaces one kind of space with another one, that
one _first_ adds the new space, then deletes the old space.  Here is
how to do this in one case (unless I am mistaken):


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 591 bytes --]

--- longlines.el	11 Jul 2005 00:37:43 +0200	1.8
+++ longlines.el	12 Jul 2005 01:32:25 +0200	
@@ -207,9 +207,10 @@
 If wrapping is performed, point remains on the line.  If the line does
 not need to be wrapped, move point to the next line and return t."
   (if (longlines-set-breakpoint)
-      (progn (backward-char 1)
-             (delete-char 1)
-             (insert-char ?\n 1)
+      (progn (insert-before-markers "\n")
+	     (backward-char 1)
+             (delete-char -1)
+	     (forward-char 1)
              nil)
     (if (longlines-merge-lines-p)
         (progn (end-of-line)

[-- Attachment #3: Type: text/plain, Size: 599 bytes --]


But it looks like quite a number of other passages might need similar
fixes.

Another thing worth mentioning is that in the presence of images, font
locking with different font sizes, proportional fonts and similar, the
wrapped column should certainly be the visual column instead of
anything else.  This means, for example, that it is completely useless
to insert a newline in the middle of an image: it only makes sense to
replace such spaces that have a different visual column.
Unfortunately, current-column does not take images into account.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-07-22 22:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 23:41 longlines.el problems David Kastrup
2005-07-12 17:05 ` Chong Yidong
2005-07-21 13:59 ` Line wrapping during redisplay (was: longlines.el problems...) Kim F. Storm
2005-07-21 16:59   ` Line wrapping during redisplay David Kastrup
2005-07-22 11:43     ` Chong Yidong
2005-07-22 22:52       ` Richard M. Stallman
2005-07-22  4:55   ` Line wrapping during redisplay (was: longlines.el problems...) Richard M. Stallman
2005-07-22  9:12     ` Line wrapping during redisplay Kim F. Storm
2005-07-22 22:51       ` Richard M. Stallman

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.