Download it now!
Bug 95669 - new AutoCorrect replace rules for two-em dash (U+2E3A) and three-em dash (U+2E3B)
Summary: new AutoCorrect replace rules for two-em dash (U+2E3A) and three-em dash (U+2...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-08 03:33 UTC by Volga
Modified: 2016-09-25 00:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2015-11-08 03:33:45 UTC
There is two dashes longer than em dash (U+2014) in Unicode, these characters are two-em dash (U+2E3A) and three-em dash (U+2E3B), but LibreOffice have no replace rules for them, so please adding rules for these characters.
Comment 2 Buovjaga 2015-11-11 17:23:12 UTC
Sounds reasonable -> NEW
Comment 3 tommy27 2015-11-11 18:01:08 UTC
@ General Kutuzov
you can already set  your own replacement in the autocorrect replacement table.

maybe something like .*-2-.* for the "two-em dash" character and .*-3-.* for the "three-em dash"

@Lazlo
what you think about? is this something we could set in the default autocorrect lists? do you have a better idea about the key sequence?
Comment 4 tommy27 2015-11-11 18:03:46 UTC
we should also be aware of potential autocorrect conflicts like those reported in Bug 67364
Comment 5 Volga 2015-11-12 02:52:49 UTC
(In reply to tommy27 from comment #4)
> we should also be aware of potential autocorrect conflicts like those
> reported in Bug 67364

I found it.
Comment 6 Volga 2015-11-12 02:57:50 UTC
(In reply to tommy27 from comment #3)
> @ General Kutuzov
> you can already set  your own replacement in the autocorrect replacement
> table.
> 
> maybe something like .*-2-.* for the "two-em dash" character and .*-3-.* for
> the "three-em dash"

I have used :----: for the "two-em dash" character and :------: for the "three-em dash", but I feel that’s not a good idea.
Comment 7 tommy27 2015-11-12 05:23:22 UTC
actually LibO default autocorrect patterns are :--: for "en-dash" and :---: for "em-dash" using the "emoji" feature in which you have to type a ":" before and after your keyword.

your "emoji" replacement :----: for the "two-em dash" and :------: for the "three-em dash" should work too, but you have to type 6 and 8 keys in order to make them work

anyway you can use a different technique as I said in my previous comment using wildcards ".*" before and after your keyword

the advantage of wildcards over emoji is that you don't have to type the whole pattern...

I mean, if you want the "en-dash" using emoji you have to type :--: (4 keys) while using the wildcard you just type -- (the .*--.* has to be typed only in the replacement table"

so using my proposed wildcards .*-2-.* for the "two-em dash" and .*-3-.* for the "three-em dash" would be a typing time saver (just 3 keys)
Comment 8 Buovjaga 2015-11-12 08:53:18 UTC
General Kutuzov: can we close this as worksforme? Are you happy with comment 7?
Comment 9 tommy27 2015-11-12 11:10:55 UTC
@Beluga
we should think if such wildcards deserve to be inserted in the default LibO autocorrect data sets. that would require a patch.
Comment 10 Volga 2015-11-18 03:01:23 UTC
Now I think use  :-2-: for the "two-em dash" and :-3-: for the "three-em dash" would be better.
Comment 11 tommy27 2015-11-18 06:13:26 UTC
hi, why do you think :-2-: would be better than .*-2-.* ?

I think it would be easier to use wildcards (.*text.*) rather than emojis (:text:) since with wildcards you have only to type the text sequence (in this case -2-) while with emojis you have actually to type the opening and closing columns too (in this case :-2-:)

so wildcards require only 3 keys typing versus 5 keys in emojis
Comment 12 Volga 2015-11-18 13:12:15 UTC
My proposal is inherited from a replace rule for dash (:---:). I think these rules can be associate with dash rule and thus they are easy to be recognized.
Comment 13 tommy27 2015-11-18 13:41:23 UTC
consider that I've seen people complaining of the current :emoji: system for en-dash and em-dash because of the extra column keys needed to trigger the replacement

the .*--.* and .*---.* cannot be used because of the collision between hyphens (see Bug 67364) 

but the .*-2-.* and .*-3-.* wildcard patterns would not suffer any collision and have the advantage that they don't need extra keys

anyway, any user may use it's preferred pattern
Comment 14 Volga 2015-11-19 03:58:56 UTC
Oh, I see. I think these rules can be added after this argument was resolved.
Comment 15 tommy27 2016-09-23 11:57:20 UTC
(In reply to tommy27 from comment #13)
> ...
> 
> the .*--.* and .*---.* cannot be used because of the collision between
> hyphens (see Bug 67364) 
> 

thanks to the fix from 67364 it's not possibile to set this autocorrect rule with no more collisions.

fix available in LibO 5.3.0 but hopefully backportable to 5.2.3
Comment 16 tommy27 2016-09-25 00:46:17 UTC
(In reply to tommy27 from comment #15)
> (In reply to tommy27 from comment #13)
> > .... it's not possibile ...

sorry, I meant "it's now possible"