all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12777: 24.2; Please support '$' in format specifications
@ 2012-11-01 13:12 Ivan Vilata i Balaguer
  2017-06-14  0:45 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Vilata i Balaguer @ 2012-11-01 13:12 UTC (permalink / raw)
  To: 12777


Hello!  It'd be nice if the "format" function allowed "%m$"
specifications (as long supported by glibc) so that arguments can be
formatted in a different order than they were provided to the function.

- It's very useful for translating format strings, e.g:

      (format "%d %s-%s" 2 "1KiB" "blocks") -> "2 1KiB-blocks"
      v    some string translation...
      (format "%1$d %3$s de %2$d" 2 "1KiB" "bloques") -> "2 bloques de 1KiB"

- It allows more flexible conversions for simple exporting templates.
  For instance Org mode passes an hyperlink URL and text through a
  customizable LaTeX format string like "\\href{%s}{%s}".  Producing
  footnotes instead would be as simple as setting the format string to
  "%2$s\\footnote{%1$s}".  Currently it's impossible to place the text
  before the URL.

Thank you very much.


In GNU Emacs 24.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-09 on praetorius, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
Configured using:
 `configure '--build' 'powerpc-linux-gnu' '--build' 'powerpc-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/powerpc-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
 'build_alias=powerpc-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ca_ES.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

-- 
Ivan Vilata i Balaguer -- https://elvil.net/





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

end of thread, other threads:[~2017-06-14  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 13:12 bug#12777: 24.2; Please support '$' in format specifications Ivan Vilata i Balaguer
2017-06-14  0:45 ` npostavs

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.