all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: martin rudalics <rudalics@gmx.at>,
	herberteuler@hotmail.com, miles@gnu.org,
	monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Patch: Syntax and Hard Newlines
Date: Mon, 20 Nov 2006 11:13:37 +0100	[thread overview]
Message-ID: <85psbi77e6.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1Gly6M-0000jW-1L@fencepost.gnu.org> (Richard Stallman's message of "Sun\, 19 Nov 2006 20\:37\:38 -0500")

Richard Stallman <rms@gnu.org> writes:

> First, I note that in this message you're talking about user-level
> behavor.  Your previous message, which Miles responded to, proposed an
> implementation, and his response was about that implementation, not
> the user-level issues.  These are two different (though closely
> related) topics.
>
> So let's look at the user-level issues you've raised, and how they
> relate to implementation.
>
>     - longlines-mode substitutes newlines for spaces.  This means that any
>        function based on scan_newline (like `goto-line') may get me results
>        that are inconsistent with those of tools analyzing the file my buffer
>        visits.  How can I treat compiler or grep output with longlines-mode?
>
> That is true, but I suspect it is not a problem since the broken lines
> of compiler output normally won't match the templates for error
> messages.  (And I am not sure it makes sense to use longlines mode in
> such buffers.)

People use longlines-mode in connection with TeX source code (however
ill-conceived that may be since TeX has a hard line length limit,
nowadays set at something like 32k), and I would suspect that they'd
also use it for things like groff and HTML source, all of which might
be processed by systems giving out line numbers (and hopefully column
numbers for long lines...) for their errors.

>     - longlines-mode may wrap a regexp like "[ \t]*" at the space
>     character.  How can I evaluate a wrapped regexp like that?
>
> The only way to avoid that consequence would be to switch from "soft
> newlines" to "power spaces".

Yes, this might be the ticket.

> I am not sure that is a good idea,

For some modes, probably.

> Longlines mode should preserve other text properties when it
> converts a space to a soft newline and vise versa.
>
>     - I use two windows of different widths to simultaneously show
>     one and the same buffer.  How can I adapt longlines-mode to wrap
>     at the right borders of my windows?
>
> It is impossible for anything like Longlines mode to do that.  That
> would require a feature implemented entirely within redisplay.

window-dependent overlays would do the trick, or a display text
property could use (when...

However, I see in

(info "(elisp) Other Display Specs.")

       You can make any display specification conditional.  To do that,
    package it in another list of the form `(when CONDITION . SPEC)'.  Then
    the specification SPEC applies only when CONDITION evaluates to a
    non-`nil' value.  During the evaluation, `object' is bound to the
    string or buffer having the conditional `display' property.  `position'
    and `buffer-position' are bound to the position within `object' and the
    buffer position where the `display' property was found, respectively.
    Both positions can be different when `object' is a string.

Since object is bound to a buffer, not a window, this would not help.
Given that text properties are supposed to be a feature of the text,
not the window, I can understand that.

> There would be no fundamental difficulty in implementing such a
> feature inside Emacs redisplay, but it would have to be implemented
> entirely in C.  It would be a variant of the current feature of line
> continuation, and it would share the big inconvenience of line
> continuation: all editing commands treat the line that has been
> continued as one single line.

Well, there is linemove.el or something like that IIRC that alleviates
some of the navigation problems.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2006-11-20 10:13 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13  5:24 Patch: Syntax and Hard Newlines Herbert Euler
2006-11-13  5:52 ` Herbert Euler
2006-11-13 10:12   ` Herbert Euler
2006-11-13 20:15   ` Richard Stallman
2006-11-14  1:35     ` Herbert Euler
2006-11-15  3:14       ` Richard Stallman
2006-11-13 19:43 ` Stefan Monnier
2006-11-14  1:19   ` Herbert Euler
2006-11-14  6:51     ` Stefan Monnier
2006-11-14  7:35       ` Herbert Euler
2006-11-14 15:00         ` Stefan Monnier
2006-11-15  1:32       ` Herbert Euler
2006-11-15  3:58         ` Stefan Monnier
2006-11-15  4:24           ` Herbert Euler
2006-11-16  6:22             ` Richard Stallman
2006-11-30  6:36               ` Herbert Euler
2006-11-30 14:52                 ` Stefan Monnier
2006-12-02 17:56                 ` Richard Stallman
2006-12-07 18:46                   ` Stefan Monnier
2006-12-08  5:04                     ` Richard Stallman
2006-12-08  7:44                       ` Stefan Monnier
2006-12-09  1:25                         ` Richard Stallman
2006-12-09  3:50                           ` Stefan Monnier
2006-12-09 18:25                             ` Richard Stallman
2006-11-15  4:37           ` Herbert Euler
2006-11-15  7:26             ` Miles Bader
2006-11-15 14:03             ` Stefan Monnier
2006-11-15 15:47               ` Johan Bockgård
2006-11-15 16:37                 ` Stefan Monnier
2006-11-16 15:01                 ` Richard Stallman
2006-11-16 15:01                 ` Richard Stallman
2006-11-23  9:33                   ` Johan Bockgård
2006-11-14 12:27   ` Richard Stallman
2006-11-14 15:08     ` Stefan Monnier
2006-11-15 22:58       ` Richard Stallman
2006-11-13 20:15 ` Richard Stallman
2006-11-14  1:42   ` Herbert Euler
2006-11-14  8:36 ` Herbert Euler
2006-11-14 11:38   ` Herbert Euler
2006-11-14 15:03     ` Stefan Monnier
2006-11-16  6:23 ` Herbert Euler
2006-11-16  8:42   ` martin rudalics
2006-11-16 10:47     ` Herbert Euler
2006-11-16 12:18       ` martin rudalics
2006-11-16 12:37         ` Herbert Euler
2006-11-16 12:57           ` martin rudalics
2006-11-16 15:12             ` Herbert Euler
2006-11-16 16:03               ` martin rudalics
2006-11-17  1:24                 ` Herbert Euler
2006-11-17  2:27                   ` Stefan Monnier
2006-11-17  1:36                 ` Herbert Euler
2006-11-16 14:22     ` Stefan Monnier
2006-11-17  6:30     ` Herbert Euler
2006-11-17 18:39       ` martin rudalics
2006-11-18  0:51         ` Herbert Euler
2006-11-18 14:34           ` martin rudalics
2006-11-18 15:21             ` Miles Bader
2006-11-19 11:11               ` martin rudalics
2006-11-19 18:14                 ` Stefan Monnier
2006-11-20  1:37                 ` Richard Stallman
2006-11-20  3:04                   ` Stefan Monnier
2006-11-20 23:57                     ` Richard Stallman
2006-11-21  0:03                       ` David Kastrup
2006-11-22 13:15                         ` Richard Stallman
2006-11-22 13:50                           ` David Kastrup
2006-11-24 22:49                             ` Richard Stallman
2006-11-26 11:42                               ` Kim F. Storm
2006-11-26 12:08                                 ` David Kastrup
2006-11-26 18:32                                   ` Kim F. Storm
2006-11-26 19:53                                     ` David Kastrup
2006-12-05 17:43                           ` David Reitter
2006-12-06 14:24                             ` Richard Stallman
2006-12-08  9:03                               ` David Reitter
2006-11-20  7:39                   ` martin rudalics
2006-11-20 10:13                   ` David Kastrup [this message]
2006-11-20  7:09                 ` Herbert Euler
2006-11-20  8:03                   ` martin rudalics
2006-11-19  0:58           ` Stefan Monnier
2006-11-19 12:47             ` Richard Stallman
2006-11-19 18:09               ` Stefan Monnier
2006-11-20 12:59                 ` Richard Stallman
2006-11-21  3:45                   ` Herbert Euler
2006-11-22 13:15                     ` Richard Stallman
2006-11-23  3:27                       ` Herbert Euler
2006-11-26  2:01                         ` Richard Stallman
2006-11-27  1:10                           ` Stefan Monnier
2006-11-29  4:06                             ` Herbert Euler
2006-11-29  4:08                               ` Herbert Euler
2006-11-29  4:57                               ` Stefan Monnier
2006-11-29  7:36                                 ` Herbert Euler
2006-11-29 11:28                                   ` Stefan Monnier
2006-11-30  3:20                                   ` Richard Stallman
2006-11-29  8:13                               ` David Kastrup
2006-11-19  7:59           ` 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=85psbi77e6.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=herberteuler@hotmail.com \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    /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.