Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
line adjustment at the end of a sentence
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 32 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom Kramer  
View profile  
 More options Sep 25 2012, 8:54 am
Newsgroups: gnu.emacs.help
From: Tom Kramer <kra...@cme.nist.gov>
Date: Tue, 25 Sep 2012 08:54:50 -0400
Local: Tues, Sep 25 2012 8:54 am
Subject: line adjustment at the end of a sentence

Hello emacs help -

I have had the following simple problem with emacs for over two decades,
so I figured it was time to ask if there is a solution. The problem is:
when a sentence ends at the end of a line, if the paragraph containing
the sentence is adjusted by hitting Esc-Q, the last word of the sentence
is moved to the next line, so that extra white space appears. Here is an
example. It is set in fixed width font as I am typing. If you do not get
it in fixed-width font, reset it in fixed-width font.

I type the following and then I use Esc-Q to reset the paragraph.

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI. Watched
Mitutoyo vid of IMTS QIF demo. Exchanged email messages with Bob Brown.

The paragraph is reset automatically as follows. The word Brown has been
moved from the
end of the second line to the beginning of a third line.

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI. Watched
Mitutoyo vid of IMTS QIF demo. Exchanged email messages with Bob
Brown.

This makes no sense. The word Brown fits easily within the right fill
column (75 in Text Fill mode). The reset paragraph looks terrible. I get
annoyed and move Brown back to the end of the second line. I have just
wasted fifteen seconds or so. This happens about once each working day.
A quarter minute for 200 days a year for 20 years is 1000 minutes I have
wasted on this dumb problem.

Is there a way to get emacs to stop doing that? Thanks.

Tom Kramer
kra...@cme.nist.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Sep 25 2012, 12:29 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Tue, 25 Sep 2012 18:29:34 +0200
Local: Tues, Sep 25 2012 12:29 pm
Subject: Re: line adjustment at the end of a sentence

> Date: Tue, 25 Sep 2012 08:54:50 -0400
> From: Tom Kramer <kra...@cme.nist.gov>

> I have had the following simple problem with emacs for over two decades,
> so I figured it was time to ask if there is a solution.

After 20 years, it's high time to "M-x report-emacs-bug RET", that's
how you bring problems to attention of the Emacs maintainers.  But see
below.

I cannot reproduce this.  I get this:

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI. Watched
Mitutoyo vid of IMTS QIF demo. Exchanged email messages with Bob Brown.

as expected.

What Emacs version did you use?  Can you show a minimal recipe to reproduce
the problem starting with "emacs -Q"?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Óscar Fuentes  
View profile  
 More options Sep 25 2012, 2:40 pm
Newsgroups: gnu.emacs.help
From: Óscar Fuentes <o...@wanadoo.es>
Date: Tue, 25 Sep 2012 20:40:17 +0200
Local: Tues, Sep 25 2012 2:40 pm
Subject: Re: line adjustment at the end of a sentence

Tom Kramer <kra...@cme.nist.gov> writes:

[snip]

> This makes no sense. The word Brown fits easily within the right fill
> column (75 in Text Fill mode).

fill-column defaults to 70. Have you changed its value? As Eli says, can
you provide a recipe starting with emacs -Q ?

[snip]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal J. Bourguignon  
View profile  
 More options Sep 25 2012, 5:18 pm
Newsgroups: gnu.emacs.help
From: "Pascal J. Bourguignon" <p...@informatimago.com>
Date: Tue, 25 Sep 2012 23:18:04 +0200
Local: Tues, Sep 25 2012 5:18 pm
Subject: Re: line adjustment at the end of a sentence

I don't get the same result as you either, because indeed, my
fill-column setting is not the same.  But one thing you're doing wrong,
is to put a single space after end-of-sentence dots.  Emacs considers a
sentence ends with dot space space, not on dot space.  If you add spaces
after the end of senctences, then justifying the text will give better
results.

With a single space after RTFI. :

9/19/12 Worked 9.5 hours.  Spent 1 hour misc.  Spent 0.5 hour
RTFI. Watched Mitutoyo vid of IMTS QIF demo.  Exchanged email messages
with Bob Brown.

With two spaces after RTFI.  :

9/19/12 Worked 9.5 hours.  Spent 1 hour misc.  Spent 0.5 hour RTFI.
Watched Mitutoyo vid of IMTS QIF demo.  Exchanged email messages with
Bob Brown.

You can also skip over sentences with M-e and M-a, and compare what
happens with a single space and with two spaces after end-of-sentence
dots.

--
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Kramer  
View profile  
 More options Sep 25 2012, 5:25 pm
Newsgroups: gnu.emacs.help
From: Tom Kramer <kra...@cme.nist.gov>
Date: Tue, 25 Sep 2012 17:25:47 -0400
Local: Tues, Sep 25 2012 5:25 pm
Subject: line adjustment at the end of a sentence

Hello emacs help -

I understand from Óscar Fuentes that Eli Zaretskii posted a reply to my
earlier email on this subject suggesting that I provide a recipe for
recreating the problem. Here is a recipe and some discussion. If anyone
writes a reply to this email, I hope s/he will send me a copy. I am not
on the regular mailing list for emacs help. Thanks.

1. Start emacs from a command window by typing emacs -Q test

2. Type the following, which will wrap around as you type.

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI.
Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages with Bob
Brown.

3. Type Esc-q The paragraph is set on three lines and looks like the
following:

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour
RTFI. Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages
with Bob Brown.

Note that the second line is much longer (69 characters) than the first
(59 characters), and there is plenty of space for RTFI to fit on the
first line.

That demonstrates the problem. To check that the problem is caused by
the end of the line, copy the word
messages from the end of the second line to the end of the first line
and type Esc-q again. Note that nothing
changes even though the first line is now much longer than it would have
been if it ended with RTFI.

I am using emacs on Linux, but I have had exactly the same problem with
other OSs.

Tom Kramer


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal J. Bourguignon  
View profile  
 More options Sep 25 2012, 5:41 pm
Newsgroups: gnu.emacs.help
From: "Pascal J. Bourguignon" <p...@informatimago.com>
Date: Tue, 25 Sep 2012 23:41:45 +0200
Local: Tues, Sep 25 2012 5:41 pm
Subject: Re: line adjustment at the end of a sentence

Tom Kramer <kra...@cme.nist.gov> writes:
> 9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour
> RTFI. Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages
> with Bob Brown.

> Note that the second line is much longer (69 characters) than the
> first (59 characters), and there is plenty of space for RTFI to fit on
> the first line.

I explained you why it is so: because you're not ending a sentence here!
Read my other answer.

--
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Sep 25 2012, 5:50 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Tue, 25 Sep 2012 23:50:37 +0200
Local: Tues, Sep 25 2012 5:50 pm
Subject: Re: line adjustment at the end of a sentence

Not reproducible here.  I get this instead:

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI.
Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages
with Bob Brown.

which is quite reasonable.

Something else is at work here, or there's something in your recipe
that you didn't tell us.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Sep 25 2012, 5:53 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Tue, 25 Sep 2012 23:53:35 +0200
Local: Tues, Sep 25 2012 5:53 pm
Subject: Re: line adjustment at the end of a sentence

> From: "Pascal J. Bourguignon" <p...@informatimago.com>
> Date: Tue, 25 Sep 2012 23:18:04 +0200

> one thing you're doing wrong, is to put a single space after
> end-of-sentence dots.  Emacs considers a sentence ends with dot
> space space, not on dot space.  If you add spaces after the end of
> senctences, then justifying the text will give better results.

That's in accurate at the very least.  See also
sentence-end-double-space.

> With a single space after RTFI. :

> 9/19/12 Worked 9.5 hours.  Spent 1 hour misc.  Spent 0.5 hour
> RTFI. Watched Mitutoyo vid of IMTS QIF demo.  Exchanged email messages
> with Bob Brown.

> With two spaces after RTFI.  :

> 9/19/12 Worked 9.5 hours.  Spent 1 hour misc.  Spent 0.5 hour RTFI.
> Watched Mitutoyo vid of IMTS QIF demo.  Exchanged email messages with
> Bob Brown.

I get reasonable results with both variants.  With a single space:

9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour RTFI.
Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages
with Bob Brown.

With 2 spaces:

9/19/12 Worked 9.5 hours. Spent 1 hour misc.  Spent 0.5 hour
RTFI.  Watched Mitutoyo vid of IMTS QIF demo.  Exchanged email
messages with Bob Brown.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Dyballa  
View profile  
 More options Sep 25 2012, 7:28 pm
Newsgroups: gnu.emacs.help
From: Peter Dyballa <Peter_Dyba...@Web.DE>
Date: Wed, 26 Sep 2012 01:28:08 +0200
Local: Tues, Sep 25 2012 7:28 pm
Subject: Re: line adjustment at the end of a sentence

Am 25.09.2012 um 23:25 schrieb Tom Kramer:

> 9/19/12 Worked 9.5 hours. Spent 1 hour misc. Spent 0.5 hour
> RTFI. Watched Mitutoyo vid of IMTS QIF demo. Exchanged email messages
> with Bob Brown.

I can reproduce it, also with typing RET at the end of the paragraph, in GNU Emacs 24.2.50.
I can reproduce it also in GNU EMacs 23.4 and 24.1. Here a RET just adds a new line.

--
Greetings

  Pete

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
        - Douglas Adams, »Mostly Harmless«


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Kramer  
View profile  
 More options Sep 26 2012, 8:01 am
Newsgroups: gnu.emacs.help
From: Tom Kramer <kra...@cme.nist.gov>
Date: Wed, 26 Sep 2012 08:00:33 -0400
Local: Wed, Sep 26 2012 8:00 am
Subject: Re: line adjustment at the end of a sentence
Hello Terry -

Thank you very much. I have put (setq sentence-end-double-space nil)
into my .emacs file and restarted emacs. The problem is solved as best I
can tell. The sample paragraph I submitted now gets set exactly the way
I prefer. The double spaces between sentences have also always annoyed
me, so setting sentence-end-double-space to nil gets two birds with one
stone.

Tom Kramer

On 09/26/2012 06:56 AM, T.F. Torrey wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
T.F. Torrey  
View profile  
 More options Sep 26 2012, 6:56 am
Newsgroups: gnu.emacs.help
From: tftor...@tftorrey.com (T.F. Torrey)
Date: Wed, 26 Sep 2012 03:56:44 -0700
Local: Wed, Sep 26 2012 6:56 am
Subject: Re: line adjustment at the end of a sentence
Hello Tom,

This same behavior caused me confusion a while back, and it took me a
bit to track it down and get my head around it.  The behavior comes from
Emacs's idea about what ends a sentence.

By default, Emacs expects two spaces after a punctuation mark ending a
sentence.  This comes from the variable sentence-end-double-space, which
has a default value of t, meaning two spaces will appear after the end
of a sentence.  If you set it to nil, you will probably get behavior
closer to what you expect.

In more detail, if I understand it correctly, by default, Emacs expects
punctuation ending sentences to be followed by two spaces or a carriage
return.  When this is the case, using a single space after an
abbreviation such as "Dr. Watson" is significant, because it isn't the
end of a sentence.  It would be wrong to fill the paragraph such that
two spaces appear between "Dr." and "Watson", so the single space must
be preserved.  The line can not be broken between "Dr." and "Watson",
because that would lose the information that it was originally a single
space, and adding text and re-filling the paragraph might put both on
the same line erroneously as two sentences as "Dr.  Watson".  So, in
your example, and in my own experience, Emacs treats the space as
unbreakable, even if the line extends beyond what looks reasonable.  It
may be a bug that it does not break the line before the "Dr." (in this
example), but it could just as easily be a deliberate design.

If you change sentence-end-double-space to nil, then the single space
between "Dr." and "Watson" is no longer significant, and Emacs will
break the line between them just fine, because reconnecting them with a
single space between would never be wrong.

As others have noted, using two spaces after periods will also work
well, and has other benefits.  Once you understand what's going on,
though, it's kind of cool.

Best regards,
Terry
--
T.F. Torrey


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ludwig, Mark  
View profile  
 More options Sep 26 2012, 1:13 pm
Newsgroups: gnu.emacs.help
From: "Ludwig, Mark" <ludwig.m...@siemens.com>
Date: Wed, 26 Sep 2012 17:12:51 +0000
Local: Wed, Sep 26 2012 1:12 pm
Subject: RE: line adjustment at the end of a sentence

The number of spaces between English sentences has been gradually switching from two to one.  (The style guide I used in college certainly required two spaces between sentences.  I wonder if newer style guides have changed to one space between sentences.)  It's good that this is configurable in Emacs, because I'm annoyed by the use of one space, as I feel it adds further ambiguity to the written language where there is already more than enough ambiguity to make understanding challenging.  Why are you annoyed by two spaces between sentences?  I'd think one's eye would just skip right over the extra space.

With 30+ years of EMACS/Emacs experience, and a love for two spaces between sentences, I've always been impressed by the way it handles "Dr. Watson" and similar uses of a single space that is not the end of a sentence.  I suppose my love for this is because of the ease with which one can act on sentences in Emacs.  I frequently use M-k (kill-sentence) in my comments in code (usually when I want to reorder the sentences).

Cheers,
Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuri Khan  
View profile  
 More options Sep 26 2012, 1:44 pm
Newsgroups: gnu.emacs.help
From: Yuri Khan <yuri.v.k...@gmail.com>
Date: Thu, 27 Sep 2012 00:44:54 +0700
Local: Wed, Sep 26 2012 1:44 pm
Subject: Re: line adjustment at the end of a sentence

On Thu, Sep 27, 2012 at 12:12 AM, Ludwig, Mark <ludwig.m...@siemens.com> wrote:
> The number of spaces between English sentences has been gradually switching from two to one.

Differentiating between end-of-sentence full stop and in-sentence
period by the number of spaces is an artifact of pre-Unicode
typography. When the only available space was the ASCII 0x20, it made
sense. Now it doesn’t, as we have the U+0020 SPACE, the U+00A0
NON-BREAKING SPACE, and the U+2009/U+200A THIN SPACE and HAIR SPACE,
respectively, as well as other fixed-width spaces.

> Why are you annoyed by two spaces between sentences?  I'd think one's eye would just skip right over the extra space.

One place where two spaces are double plus annoying is when people try
to apply this rule to the Web. As HTML by definition collapses all
runs of consecutive whitespace, they have to make one of the spaces a
non-breaking space. So it becomes either NBSP+SPACE, or SPACE+NBSP.
Now suppose the line is wrapped at this sequence. In the former case,
the NBSP will be left last on the line; if the paragraph is justified,
it will make a ragged right. In the latter case it is even worse — the
NBSP will wrap onto the second line, making a ragged left.

Today, the logical rule is to put a space where the line may be
wrapped and where justification may modify space width; a non-breaking
space where line may not be broken and width must be preserved; and
one of the fixed width spaces where line break is OK but width must be
fixed. I see no reason to selectively apply it to the Web only.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 26 2012, 1:51 pm
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Wed, 26 Sep 2012 10:50:24 -0700
Local: Wed, Sep 26 2012 1:50 pm
Subject: RE: line adjustment at the end of a sentence

> The number of spaces between English sentences has been
> gradually switching from two to one.

Dunno about that.  Mostly I think people just use plain text less and formatted
text more nowadays.

FWIW, English (at least the American variety) has typically used two spaces for
typewritten text, but some other languages (e.g., French) have used only one.
Other punctuation (e.g. `:', `;') also offers differences wrt spacing among
different languages.

> I've always been impressed by the way it handles "Dr. Watson" and
> similar uses of a single space that is not the end of a sentence.

Wrt filling, with non-nil `sentence-end-double-space', Emacs tends to treat a
single space after period somewhat like a no-break space.

There are also other sentence and spacing related user options in Emacs:
`colon-double-space', `sentence-end', `sentence-end-base',
`sentence-end-without-space', `sentence-end-without-period'.

> the ease with which one can act on sentences in Emacs.

Yup.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Sep 26 2012, 3:24 pm
Newsgroups: gnu.emacs.help
From: Eli Zaretskii <e...@gnu.org>
Date: Wed, 26 Sep 2012 21:23:44 +0200
Local: Wed, Sep 26 2012 3:23 pm
Subject: Re: line adjustment at the end of a sentence

> Date: Thu, 27 Sep 2012 00:44:54 +0700
> From: Yuri Khan <yuri.v.k...@gmail.com>
> Cc: Tom Kramer <kra...@cme.nist.gov>,
>    "help-gnu-em...@gnu.org" <help-gnu-em...@gnu.org>

> Differentiating between end-of-sentence full stop and in-sentence
> period by the number of spaces is an artifact of pre-Unicode
> typography. When the only available space was the ASCII 0x20, it made
> sense. Now it doesn’t, as we have the U+0020 SPACE, the U+00A0
> NON-BREAKING SPACE, and the U+2009/U+200A THIN SPACE and HAIR SPACE,
> respectively, as well as other fixed-width spaces.

But in the real world, there's still a lot of text with 2 spaces
between sentences, and Emacs needs to DTRT with that.  An editor
cannot throw in the towel when it bumps into text that uses two
spaces.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Margolin  
View profile  
 More options Sep 26 2012, 4:35 pm
Newsgroups: gnu.emacs.help
From: Barry Margolin <bar...@alum.mit.edu>
Date: Wed, 26 Sep 2012 16:35:25 -0400
Local: Wed, Sep 26 2012 4:35 pm
Subject: Re: line adjustment at the end of a sentence
In article <mailman.9790.1348681903.855.help-gnu-em...@gnu.org>,
 "Drew Adams" <drew.ad...@oracle.com> wrote:

> > The number of spaces between English sentences has been
> > gradually switching from two to one.

> Dunno about that.  Mostly I think people just use plain text less and
> formatted
> text more nowadays.

Right. The old convention was for typewriters with fixed-width fonts,
and Emacs was designed for the same type of text processing.

I don't think it was ever applied to typeset text, and most people now
use word processors that generate comparable output.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Sep 26 2012, 8:34 pm
Newsgroups: gnu.emacs.help
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Wed, 26 Sep 2012 20:34:02 -0400
Local: Wed, Sep 26 2012 8:34 pm
Subject: Re: line adjustment at the end of a sentence

> Differentiating between end-of-sentence full stop and in-sentence
> period by the number of spaces is an artifact of pre-Unicode
> typography.  When the only available space was the ASCII 0x20, it made
> sense.  Now it doesn’t, as we have the U+0020 SPACE, the U+00A0
> NON-BREAKING SPACE, and the U+2009/U+200A THIN SPACE and HAIR SPACE,
> respectively, as well as other fixed-width spaces.

While Unicode provides the necessary different elements to eliminate the
need to use conventions such as double-spaces to end sentences, I don't
think Unicode has penetrated enough in everyday use yet to make such
conventions completely useless.

E.g. for many people it's much easier to type SPC sometimes and SPC SPC
other times than to try and figure out how to type NBSP.
Also there's no good convention for how to distinguish on screen a SPC
from a NBSP.  Emacs highlights the NBSP specially (because accidental
use of NBSP in program code leads to trouble) but that's not ideal when
reading text that uses NBSP between Dr. and Watson or between « and the
quoted text.

So the Unicode characters offer a way to represent/store the needed
information, but I don't think we have yet a sufficiently good way for
the user to enter this information, nor do we have a sufficiently good
way for Emacs to display this information.

> One place where two spaces are double plus annoying is when people try
> to apply this rule to the Web.

While the "double space convention" might be at the origin of those
problems, I don't think it's unfair to say that it's a case where the
"double space convention" is annoying, because this convention applies
to plain text only.
We can apply the convention to HTML source code (it will only help us
navigate the text but won't affect the display), but we can't directly
apply it to its rendering because we don't type its rendering.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Abrahamsen  
View profile  
 More options Sep 26 2012, 11:21 pm
Newsgroups: gnu.emacs.help
From: Eric Abrahamsen <e...@ericabrahamsen.net>
Date: Thu, 27 Sep 2012 11:21:31 +0800
Local: Wed, Sep 26 2012 11:21 pm
Subject: Re: line adjustment at the end of a sentence

For everyone's entertainment, the following is from Bringhurst's
excellent _The Elements of Typographic Style_:

"2.1.4 Use a single word space between sentences.

In the nineteenth century, which was a dark and inflationary age in
typography and type design, many compositors were encouraged to stuff
extra space between sentences. Generations of twentieth-century typists
were then taught to do the same, by hitting the spacebar twice after
every period. Your typing as well as your typesetting will benefit from
unlearning this quaint Victorian habit."

Obviously, emacs still needs to be able to handle it!

E

--
GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 3.4.4)
 of 2012-09-16 on pellet


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 27 2012, 1:26 am
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Wed, 26 Sep 2012 22:26:21 -0700
Local: Thurs, Sep 27 2012 1:26 am
Subject: RE: line adjustment at the end of a sentence

> Also there's no good convention for how to distinguish on screen a SPC
> from a NBSP.  Emacs highlights the NBSP specially (because accidental
> use of NBSP in program code leads to trouble) but that's not
> ideal when reading text that uses NBSP between Dr. and Watson or
> between < and the quoted text.

I agree generally with everything you said.  Wrt showing no-break space and
non-breaking hyphen so that you can distinguish them from SPC and ASCII hyphen,
`show-wspace.el' can help.

There are commands that toggle the distinguishing display of each on/off, and
you can customize the faces used for that.  Quick toggling is helpful, because
most of the time you don't care about the difference, but you can easily check.

http://www.emacswiki.org/emacs-en/show-wspace.el

http://emacswiki.org/emacs/ShowWhiteSpace#ShowWspace


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Sep 27 2012, 8:19 am
Newsgroups: gnu.emacs.help
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Thu, 27 Sep 2012 08:19:03 -0400
Local: Thurs, Sep 27 2012 8:19 am
Subject: Re: line adjustment at the end of a sentence

> I agree generally with everything you said.  Wrt showing no-break
> space and non-breaking hyphen so that you can distinguish them from
> SPC and ASCII hyphen, `show-wspace.el' can help.

I don't think any of those comes anywhere close to the convenient of
"SPC vs SPC-SPC" in terms of showing the difference without getting in
the way.

> There are commands that toggle the distinguishing display of each on/off

A really good solution would not require turning it on/off.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 27 2012, 10:57 am
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Thu, 27 Sep 2012 07:57:16 -0700
Local: Thurs, Sep 27 2012 10:57 am
Subject: RE: line adjustment at the end of a sentence

> > I agree generally with everything you said.  Wrt showing no-break
> > space and non-breaking hyphen so that you can distinguish them from
> > SPC and ASCII hyphen, `show-wspace.el' can help.

> I don't think any of those comes anywhere close to the convenient of
> "SPC vs SPC-SPC" in terms of showing the difference without getting in
> the way.

That was not the point.  I was responding to your point that:

> how to distinguish on screen a SPC from a NBSP.  Emacs highlights
> the NBSP specially (because accidental use of NBSP in program code
> leads to trouble) but that's not ideal when reading text that uses
> NBSP between Dr. and Watson or between < and the quoted text.

The `nobreak-char-display' highlighting provided by Emacs is all or nothing (one
variable for both chars together, and not a user option), face not separately
customizable from escape glyph highlighting, and no toggles.

Those are the weaknesses that `show-wspace.el' overcomes for these two chars and
the reason it can help distinguishing them without that always getting in the
way.

And not just those two chars.  You can use it to distinguish any chars you like.

> > There are commands that toggle the distinguishing display
> > of each on/off

> A really good solution would not require turning it on/off.

It's not about requiring.  Sometimes (and perhaps in some places) you want to
distinguish such chars, sometimes you do not.  You want to be able to pick those
times - i.e., on demand.

Other editors and word processors do this kind of thing all the time, not only
wrt hard-to-detect chars but wrt other things that you sometimes want to see and
sometimes do not: XML element boundaries and attributes, editor text
symbols/artifacts (e.g. pilcro), conditionalized text, and so on.

Just as in Emacs you can choose whether to see control chars using ^ syntax or
\ooo syntax, so you can choose whether and when to see other chars in particular
ways.

No DWIM will ever guess just when you want to see what.  You can add heuristics
to try to fit common use cases, but that's all.

See what XML and WYSIWYG editors do in this regard: they offer different "views"
that correspond to common use cases, showing different sets of such things, and
they offer individual toggle commands to handle individual such things.  See
Framemaker, Arbortext Epic, Oxygen, and other XML editors, for example.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Sep 27 2012, 12:38 pm
Newsgroups: gnu.emacs.help
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Thu, 27 Sep 2012 12:37:54 -0400
Local: Thurs, Sep 27 2012 12:37 pm
Subject: Re: line adjustment at the end of a sentence

>> A really good solution would not require turning it on/off.
> It's not about requiring.  Sometimes (and perhaps in some places) you
> want to distinguish such chars, sometimes you do not.  You want to be
> able to pick those times - i.e., on demand.

"SPC vs SPC SPC" lets you eat your cake and have it too, because while
it shows the difference, your brain will happily disregard it, so noone
ever felt the need to provide a command to switch between "show the
diff" and "hide the diff".

So, yes, it's about "requiring".

> Other editors and word processors do this kind of thing all the time,
> not only wrt hard-to-detect chars but wrt other things that you
> sometimes want to see and sometimes do not: XML element boundaries and
> attributes, editor text symbols/artifacts (e.g. pilcro),
> conditionalized text, and so on.

Yes, in the general case, there's probably no way to avoid the need to
distinguish between "show markup" and "hide markup".  But some markup
(such as the SPC vs SPC SPC convention) is sufficiently lightweight that
you don't need to have those two states.

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 27 2012, 1:00 pm
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Thu, 27 Sep 2012 10:00:30 -0700
Local: Thurs, Sep 27 2012 1:00 pm
Subject: RE: line adjustment at the end of a sentence

> >> A really good solution would not require turning it on/off.
> >> It's not about requiring.  Sometimes (and perhaps in some
> >> places) you want to distinguish such chars, sometimes you do not.
> >> You want to be able to pick those times - i.e., on demand.

> "SPC vs SPC SPC" lets you eat your cake and have it too, because
> while it shows the difference, your brain will happily disregard it,
> so noone ever felt the need to provide a command to switch between
> "show the diff" and "hide the diff".

I have no problem with "SPC vs SPC SPC".  Never have had.

Apparently you are talking about something else than I.  My point was in reply
to your post regarding distinguishing no-break space from SPC.

*IF* you have SPC and no-break space chars in the same buffer, *THEN* what I
mentioned provides a good way to distinguish them when you want to and not
distinguish them when you do not want to.  A much better way than the one you
mentioned: what vanilla Emacs provides.

That is a different discussion from whether one should try to use no-break space
vs SPC as some kind of substitute for "SPC vs SPC SPC".  I did not and would not
propose that.

> So, yes, it's about "requiring".

You will never come up with a DWIM that guesses exactly just when and where Ms.
X or Mr. Y might want to distinguish SPC from no-break space visually.

So no, it is not about "requiring" users to toggle.  They will _want_ to be able
to turn showing such differences on/off easily.  Experience with other editors
and word processors that deal with such distinctions should make that clear.

> > Other editors and word processors do this kind of thing all
> > the time, not only wrt hard-to-detect chars but wrt other things that you
> > sometimes want to see and sometimes do not: XML element boundaries and
> > attributes, editor text symbols/artifacts (e.g. pilcro),
> > conditionalized text, and so on.

> Yes, in the general case, there's probably no way to avoid the need to
> distinguish between "show markup" and "hide markup".

Good.  But don't look at it so negatively.  It is a _good_ thing for users to be
able to easily change the way they see things.

Providing them _only_ some programmer's guess as to what they need (DWIM) would
be restrictive.  Give them some common views, certainly, but let them also pick
and choose.

> But some markup (such as the SPC vs SPC SPC convention) is sufficiently
> lightweight that you don't need to have those two states.

Irrelevant - see above.  IF you have both SPC and no-break present THEN...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stefan Monnier  
View profile  
 More options Sep 27 2012, 2:04 pm
Newsgroups: gnu.emacs.help
From: Stefan Monnier <monn...@iro.umontreal.ca>
Date: Thu, 27 Sep 2012 14:04:16 -0400
Local: Thurs, Sep 27 2012 2:04 pm
Subject: Re: line adjustment at the end of a sentence

> Apparently you are talking about something else than I.

Of course: I'm talking about distinguishing sentence separators from
other spaces (the subject of this thread, AFAICT).

        Stefan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sivaram Neelakantan  
View profile  
 More options Sep 29 2012, 10:09 am
Newsgroups: gnu.emacs.help
From: Sivaram Neelakantan <nsivaram....@gmail.com>
Date: Sat, 29 Sep 2012 19:39:06 +0530
Local: Sat, Sep 29 2012 10:09 am
Subject: Re: line adjustment at the end of a sentence
On Thu, Sep 27 2012,Eric Abrahamsen wrote:

[snipped 21 lines]

> "2.1.4 Use a single word space between sentences.

> In the nineteenth century, which was a dark and inflationary age in
> typography and type design, many compositors were encouraged to
> stuff extra space between sentences. Generations of
> twentieth-century typists were then taught to do the same, by
> hitting the spacebar twice after every period. Your typing as well
> as your typesetting will benefit from unlearning this quaint
> Victorian habit."

I spend 10 years learning to double space because Emacs says so and
M-q plays nice to me and you dig this out?

Just when I know something, someone changes the rules!  Again. :-)

 sivaram
 --


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 32   Newer >
« Back to Discussions « Newer topic     Older topic »