From mboxrd@z Thu Jan 1 00:00:00 1970 From: znavko@disroot.org Subject: Re: prevent inserting \n symbol in the end of lines in emacs po-mode Date: Tue, 16 Apr 2019 18:38:43 +0000 Message-ID: <331109013c5224c5b1bfd15872cf1b3a@disroot.org> References: <20190413175300.52yd5izlm5et657b@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--=_RainLoop_601_770110810.1555439923" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGSyq-0008Ah-8A for help-guix@gnu.org; Tue, 16 Apr 2019 14:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGSyo-0000in-Jv for help-guix@gnu.org; Tue, 16 Apr 2019 14:38:52 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46360) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hGSyn-0000i0-Vg for help-guix@gnu.org; Tue, 16 Apr 2019 14:38:50 -0400 In-Reply-To: <20190413175300.52yd5izlm5et657b@pelzflorian.localdomain> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: "pelzflorian (Florian Pelz)" Cc: help-guix ----=_RainLoop_601_770110810.1555439923 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, Florian! You said 'Normally I press Ctrl+J to copy the original ms= gid and adapt it without adding newlines.'=0AGive me detailed instruction= how to add this option into my emacs?=0AI use emacs + pomode, and I pres= s Return to get new area for translate. But pressing Ctrl + J there reall= y insert a new line.=0AI want to insert original msgid without changes.= =0ANow I need to copy it and it is copying with dustbin n and " symbols a= nd also screening quotes: ".=0AIt is so hard to copy and paste Scheme mul= ti-line code and then edit it.=0AHow to insert exact copy without dustbin= symbols?=0A=0AFor example I'm on this msgid. It's not easy to erase this= garbage in the end and start of lines, also ":=0A=0A"(define my-packagen= "=0A" (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")n"=0A" (re= vision "1")) ;Guix package revisionn"=0A" (packagen"=0A" (version (git-ve= rsion "0.9" revision commit))n"=0A" (source (originn"=0A" (method git-fet= ch)n"=0A" (uri (git-referencen"=0A" (url "git://example.org/my-package.gi= t")n"=0A" (commit commit)))n"=0A" (sha256 (base32 "1mbikn@dots{}"))n"=0A"= (file-name (git-file-name name version))))n"=0A" ;; @dots{}n"=0A" )))n"= =0A=0ASure I can use regexp, but it takes time without any good.=0A=0AApr= il 13, 2019 5:58 PM, "pelzflorian (Florian Pelz)" wrote:=0A On Sat, Apr 13, 2019 = at 04:45:21PM +0000, znavko@disroot.org (mailto:znavko@disroot.org) wrote= :=0A When editing .po file in emacs po-mode and inserting two lines into= =0Amsgstr, emacs adds "n" symbol.=0A=0AAnd it breaks the logic here:=0A= =0A#. type: Plain text=0A#: doc/contributing.texi:141=0Amsgid ""=0A"@dots= {} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile "=0A"= Reference Manual}):"=0Amsgstr ""=0A"@dots{} =D0=B8 =D0=B4=D0=BB=D1=8F REP= L (@pxref{Using Guile Interactively,,, guile, Guilen"=0A"Reference Manual= }):"=0A=0Ahttp://0x0.st/zNAS.png (http://0x0.st/zNAS.png) (http://0x0.st/= zNAS.png (http://0x0.st/zNAS.png))=0A=0AI think link to Guile Reference m= anual will not work with n in the=0Amiddle of it. =0A=0AThis n is printed= in place of a newline character. I believe you=0Ahave wrapped the paragr= aph to multiple lines when it must be on a=0Asingle line. Normally I pres= s Ctrl+J to copy the original msgid and=0Aadapt it without adding newline= s.=0A I've enabled long-line-mode as described here=0Ahttps://www.emacswi= ki.org/emacs/PoMode (https://www.emacswiki.org/emacs/PoMode)=0A(https://w= ww.emacswiki.org/emacs/PoMode (https://www.emacswiki.org/emacs/PoMode)) (= and including longlines.el=0Ainto .emacs)=0A=0ASo I can create long-long = lines and they are displaying convenient=0Away. And I've compared french = translation does not follow the same=0Aline length rule as in original po= file: http://0x0.st/zNmQ.png (http://0x0.st/zNmQ.png) =0A=0AWhen you op= en the French PO file and start editing the msgstr in=0Aemacs=E2=80=99 po= -mode, you will see it has no line wrapping any more. The=0Aparagraph tha= t was a single line must be on a single line when editing=0Ait in emacs= =E2=80=99 po-mode.=0A But nevertheless is it necessary to insert translat= ion messages=0Astrings with line breaks but without emacs insert 'n' in t= he end of=0Aline? =0A=0AI do not know emacs well enough. Maybe there is a= way to print long=0Alines more nicely, but I just go with an ugly long l= ine. A single=0Aline must remain a single line for the po-mode logic.=0A= =0ARegards,=0AFlorian ----=_RainLoop_601_770110810.1555439923 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
H= ello, Florian! You said 'Normally I press Ctrl+J to copy the original msg= id and adapt it without adding newlines.'
Give me detailed instruction= how to add this option into my emacs?
I use emacs + pomode, and I pre= ss Return to get new area for translate. But pressing Ctrl + J there real= ly 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 du= stbin symbols?

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

"(define m= y-package\n"
" (let ((commit \"c3f29bc928d5900971f65965feaae59e1272a3f= 7\")\n"
" (revision \"1\")) ;Guix package revision\n"
" (package\n"=
" (version (git-version \"0.9\" revision commit))\n"
" (source (or= igin\n"
" (method git-fetch)\n"
" (uri (git-reference\n"
" (url = \"git://example.org/my-package.git\")\n"
" (commit commit)))\n"
" (= sha256 (base32 \"1mbikn@dots{}\"))\n"
" (file-name (git-file-name name= version))))\n"
" ;; @dots{}\n"
" )))\n"

Sure I can use rege= xp, but it takes time without any good.

April 13, 2019 5:58 PM, "p= elzflorian (Florian Pelz)" <pelzflorian@pelzflorian= .de> wrote:
On Sat, Apr 13, 2019 at 04:45:21PM +00= 00, znavko@disroot.org 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: Pla= in text
#: doc/contributing.texi:141
msgid ""
"@dots{} and for a= REPL (@pxref{Using Guile Interactively,,, guile, Guile "
"Reference M= anual}):"
msgstr ""
"@dots{} =D0=B8 =D0=B4=D0=BB=D1=8F 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 multi= ple 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 longlin= es.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: h= ttp://0x0.st/zNmQ.png


When you open the French = PO file and start editing the msgstr in
emacs=E2=80=99 po-mode, you wi= ll see it has no line wrapping any more. The
paragraph that was a sing= le line must be on a single line when editing
it in emacs=E2=80=99 po-= mode.
But nevertheless is it necessary to insert translat= ion 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 w= ith an ugly long line. A single
line must remain a single line for the= po-mode logic.

Regards,
Florian
----=_RainLoop_601_770110810.1555439923--