Neither of those suggestions worked (and I saved and restarted after the second suggestion). The formatting marks show nothing unusual - just a tick for a single space before the section that I am replacing. After the paste there are two ticks for spaces instead of one.
Selecting a whole word, copying it and pasting it by default would indeed add spaces. E.g., if you type some text like “Lorem ipsum dolor sit amet”, select word “ipsum” without spaces before/after, then put cursor inside “dolor” (say, between “o” and “l”) and paste (Ctrl+V), the inserted word would be separated by spaces. But pasting as unformatted text would prevent the spaces.
However, no idea what could cause added spaces after quoted number.
It seems to me that adding leading or trailing spaces when pasting inside a word is a flaw, or at least something that should be able to be disabled by the user. For decades I have used a powerful programmer’s editor for plain text files, and with its built-in macro capability I also use it for creating HTML and for some other purposes. It does not, however, support adding hyperlinks to documents, which is a feature that I need in my dozens of index files that provide hyperlink access to 18,000 individual files store on my HD. Whenever a computer program thinks it knows more about how edit a file than I do I consider that a flaw. Maybe I am just old-fashioned - after all, I took my first college-level computer programming class at MIT in the fall of 1967.
MeToo: Although it is some months later, I stumbled over the same “feature”, which I would call an outright bug. Linux RHEL 7.8, LO Writer 5.3.6.1. I was documenting some process and showing the code which I wanted to use afterwards, and sure enough, there was a blank somewhere in between. I first had to realize what was going on, then correct the code and the errors caused by the process, then analyse how come… PLEASE!
I don’t know if this is relevant, but experiment shows the copy part adds some context information to the operation.
Starting from “Lorem ipsum dolor sit”, select part of a word (meaning not the full word, selection limit may or may not extend to word start or end but not both). Copy and paste anywhere; the pasted segment is exactly as selected. Now select a word, either by swiping the mouse or double-clicking. Note that the visual feedback for the selection does not include the spaces. Copy and paste. Write seems to apply some “smart” strategy: since a word was selected, then a separate word will be pasted, eventually adding a space at left, right or both to make sure it remains a word. The algorithm is “smart” enough to cope with punctuation.
Not had the time to check the documentation about it, but I think there is a mention somewhere. So this is specification. Don’t know it there is an advanced setting to enable/disable it.
Well, I think I can confirm this - sort of.
I have a string like /this_word_one/this_word_two/this_word_three/
which I need to convert to /xxxxx/yyyyy/this_word_three (no ending slash).
So, I write /xxxxx/yyyyy/
then I copy this_word_three from above – and LO adds the space before the real pasting action.
If I only copy word_three it does just the same, this means in fact it regards this_word_three as 3 words.
You are right in that if I copy a string like ord_thre , the space is not added.
Sooo, I REALLY do not want to have to cope with LO’s idea of what is and is not a word. And if it tries to be smarter than its user (oh my, this reminds me of my favorite rant about some other software I replaced with LO), it should clearly provide (that is OFFER or even propose, not hide) an option to change this behaviour.
I see that no solution has become available in two years. I have discovered another flaw. I needed to replace all occurrences of “(NEHGR)” with “(The New England Historical and Genealogical Register)”, but LibreOffice ignores the parenthesis and replaces all occurances of “NEHGR” with “The New England Historical and Genealogical Register.” I really **** coders who think they know more about how I want to use a program than I do. Any “feature” which alters an operation should be provided with the ability to disable that feature.
Just a quick guess without test:
Uncheck " regular expression " or
use quotes for the paranthesis.
And if you are keen on rules: New questions for new topics. Please don’t create a “all my findings” thread on an ask-site.
I unchecked the regular expressions checkbox, saved the file, and closed LO Write. When I opened another file it was still unchecked. Does LO preserve the last state of that checkbox? Is there any way to disable preserving that last state? I don’t often use regular expressions in LO. I do use them frequently in my programmer’s editor, but it doesn’t preserve states unless explicitly told to do so.
I’m sorry if I violated any rules here - I do all of my heavy lifting with my programmer’s editor, but it does not support embedded hyperlinks, so I have to use LO for some files.
@Wanderer is correct. Turning off Regular Expressions does what you want.
If you have Regular Expressions ticked then parentheses are used for grouping so in this case (NEHGR) would be the same as NEHGR and it will also pick up NEHGR without parentheses in the text. If you are using Regular Expressions then in the Find field enter \(NEHGR\)
, the \
makes the following character literal.
What I don’t quite understand is why you didn’t get double parentheses in the replaced text where it was replacing (NEHGR), e.g. ((The New England Historical and Genealogical Register))
This has been an issue for me while writing a long documents in English featuring a word, usually a name, which has accent marks, as switching the keyboard layout to make that easier to type switches the text language. As I’m pasting the same word over and over in these instances, my workaround is to paste it into notepad and re-copy it, as it then doesn’t get treated as a word and the extra spaces aren’t added. Not useful where you’re pasting varying text from within the same document, unfortunately.
Just paste in Writer using Shift+Ctrl+Alt+V (“Paste unformatted text”)?
Are you under Windows? This doesn’t happen under Linux.
Another workaround is to create an AutoText for your word and associate it with a shortcut (3 unfrequent letters or signs should be adequate). You then type the shortcut followed by F3 to replace the shortcut by the word.
Way harder to reach than just ctrl-v - painful with just my left hand and likely to mess up the subsequent word if I move my right hand to get to the v - and I’m copying once at the start of an extended writing session and pasting dozens of times because its the name of the person I’m writing about.
I probably would do that if moving multiple individual things around, but in this case, as I can’t turn the undesirable behaviour off, and dont want to develop behaviour that will screw me up when using other machines/apps (ie, not typing the space before the name) or to be doing something uncomfortable every couple of minutes, the extra step which takes about a second when I start for the day works for me.
Not sure about what you’re talking. If it is about my AutoText suggestion, you configure it only once. The word and its abbreviation/shortcut is entered into your user profile. So, it is readily available when you start a new session. And … F3 can be reached with a single finger of your left hand.
Windows, yes.
And while I have done a lot of things with autotext in the past, and if I was writing a novel with a protagonist with an accented name it would be worth doing that, but I’m generally working with each name for a couple of hours so the notepad thing works pretty well. I didnt notice it until recently because I had been taking the names out of my email but that doesnt work on the pc in question any more.
Yes, thats why I said I’d do that if I were writing a novel and so the same name was being used for an extended period, but in my particular case a name gets used in a document that’ll take me a few hours at most and then I’ll have a different name in the next one (and not all the names have accents or weird spellings so half the time I just type them anyway). So I’d be changing that autotext each time I had a new name that was a pain to type and the notepad thing is quicker. Kinda wishing I’d kept my trap shut now, but still. The main point is still that any ‘helpful’ feature will have cases where its really annoying and so it really ought to have a way to turn it off.
for reference : tdf#128595
Drives me nuts too. Many people select and paste precisely rather than sloppily and will hit the space before or after a paste when needed, and it is a constant irritation to have the computer deciding you want something different from what you’ve done. It’s normal practice to be able to disable such features. At least Ctrl-Shift-Alt-V provides some workaround.
One of many frustrating features unfortunately.