help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: prevent inserting \n symbol in the end of lines in emacs po-mode


From: znavko
Subject: Re: prevent inserting \n symbol in the end of lines in emacs po-mode
Date: Tue, 16 Apr 2019 18:38:43 +0000

Hello, Florian! You said 'Normally I press Ctrl+J to copy the original msgid and adapt it without adding newlines.'
Give me detailed instruction how to add this option into my emacs?
I use emacs + pomode, and I press Return to get new area for translate. But pressing Ctrl + J there really insert a new line.
I want to insert original msgid without changes.
Now I need to copy it and it is copying with dustbin \n and " symbols and also screening quotes: \".
It is so hard to copy and paste Scheme multi-line code and then edit it.
How to insert exact copy without dustbin symbols?

For example I'm on this msgid. It's not easy to erase this garbage in the end and start of lines, also \":

"(define my-package\n"
" (let ((commit \"c3f29bc928d5900971f65965feaae59e1272a3f7\")\n"
" (revision \"1\")) ;Guix package revision\n"
" (package\n"
" (version (git-version \"0.9\" revision commit))\n"
" (source (origin\n"
" (method git-fetch)\n"
" (uri (git-reference\n"
" (url \"git://example.org/my-package.git\")\n"
" (commit commit)))\n"
" (sha256 (base32 \"address@hidden"))\n"
" (file-name (git-file-name name version))))\n"
" ;; @dots{}\n"
" )))\n"

Sure I can use regexp, but it takes time without any good.

April 13, 2019 5:58 PM, "pelzflorian (Florian Pelz)" <address@hidden> wrote:
On Sat, Apr 13, 2019 at 04:45:21PM +0000, address@hidden wrote:
When editing .po file in emacs po-mode and inserting two lines into
msgstr, emacs adds "n" symbol.

And it breaks the logic here:

#. type: Plain text
#: doc/contributing.texi:141
msgid ""
"@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile "
"Reference Manual}):"
msgstr ""
"@dots{} и для REPL (@pxref{Using Guile Interactively,,, guile, Guilen"
"Reference Manual}):"

http://0x0.st/zNAS.png (http://0x0.st/zNAS.png)

I think link to Guile Reference manual will not work with n in the
middle of it.


This \n is printed in place of a newline character. I believe you
have wrapped the paragraph to multiple lines when it must be on a
single line. Normally I press Ctrl+J to copy the original msgid and
adapt it without adding newlines.
I've enabled long-line-mode as described here
https://www.emacswiki.org/emacs/PoMode
(https://www.emacswiki.org/emacs/PoMode) (and including longlines.el
into .emacs)

So I can create long-long lines and they are displaying convenient
way. And I've compared french translation does not follow the same
line length rule as in original po file: http://0x0.st/zNmQ.png


When you open the French PO file and start editing the msgstr in
emacs’ po-mode, you will see it has no line wrapping any more. The
paragraph that was a single line must be on a single line when editing
it in emacs’ po-mode.
But nevertheless is it necessary to insert translation messages
strings with line breaks but without emacs insert 'n' in the end of
line?


I do not know emacs well enough. Maybe there is a way to print long
lines more nicely, but I just go with an ugly long line. A single
line must remain a single line for the po-mode logic.

Regards,
Florian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]