unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36186: 26.2.90; texinfmt: @uref{can't use @@ in its operand}
@ 2019-06-12 23:17 Katsumi Yamaoka
  2019-07-09  2:03 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Katsumi Yamaoka @ 2019-06-12 23:17 UTC (permalink / raw)
  To: 36186

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

Hi,

Here are two recipes:

(with-temp-buffer
  (insert "@setfilename test.info\n"
	  "@uref{https://www.example.com/, @@home page}\n")
  (texinfo-format-buffer))

(with-temp-buffer
  (insert "@setfilename test.info\n"
	  "@uref{mailto:foo@@example.com}")
  (texinfo-format-buffer))

The cause of both the errors is that the `texinfo-format-uref'
function moves point to the beginning of its formatted text,
texinfmt tries to format it again, and "@" (formatted "@@") is
treated as a command.

I'm not quite sure if there are things that should be formatted
again, but if it is not, it is unnecessary to go to the beginning
(a patch below).  Otherwise, the function must not format "@@" to
"@".

Thanks.
Regards,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 302 bytes --]

--- texinfmt.el~	2019-04-05 04:42:06.053686300 +0000
+++ texinfmt.el	2019-06-12 23:13:53.063255400 +0000
@@ -1294,4 +1294,3 @@
         (insert  (nth 1 args) " (" (nth 0 args) ")")
-      (insert "`" (nth 0 args) "'"))
-    (goto-char texinfo-command-start)))
+      (insert "`" (nth 0 args) "'"))))
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#36186: 26.2.90; texinfmt: @uref{can't use @@ in its operand}
  2019-06-12 23:17 bug#36186: 26.2.90; texinfmt: @uref{can't use @@ in its operand} Katsumi Yamaoka
@ 2019-07-09  2:03 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-09  2:03 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 36186

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> (with-temp-buffer
>   (insert "@setfilename test.info\n"
> 	  "@uref{mailto:foo@@example.com}")
>   (texinfo-format-buffer))
>
> The cause of both the errors is that the `texinfo-format-uref'
> function moves point to the beginning of its formatted text,
> texinfmt tries to format it again, and "@" (formatted "@@") is
> treated as a command.

Makes sense.  I've now applied your patch to the trunk and checked that
the .info files are generated without any warnings.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-09  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 23:17 bug#36186: 26.2.90; texinfmt: @uref{can't use @@ in its operand} Katsumi Yamaoka
2019-07-09  2:03 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).