From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Format with %-* Date: Mon, 08 Jul 2024 19:47:46 +0200 Message-ID: <668c2644.050a0220.1cd50.0e56@mx.google.com> References: <-t_b-eMlmOCn1_vFdAmz9waZjs7MjLMZYRZVXJA3NXssGUg92uCVXGpvbYwFJWOfrwcigbCc6tP3SxPlpPuebgW_SdhWSAQguDd6lSXj_Oc=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="853"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime , Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 08 19:48:37 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sQsTd-000AdV-Rp for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Jul 2024 19:48:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQsTA-00031B-PY; Mon, 08 Jul 2024 13:48:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQsT2-0002YC-4r for help-gnu-emacs@gnu.org; Mon, 08 Jul 2024 13:48:01 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQsSs-0001fK-Sa for help-gnu-emacs@gnu.org; Mon, 08 Jul 2024 13:47:59 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4266f3e0df8so2483325e9.2 for ; Mon, 08 Jul 2024 10:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720460869; x=1721065669; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ft3BQ35r6eQv2/5L7DcuubLp/BcVcWMiCmprNGFBEAo=; b=HcNc3aEmHk734otlIwkDhjz7IjUQtLqQxdbrCJ0NS5LLbOLr3R9eGy/P57QUFpvhgX 8piRWZmzFvndnZdfqJZ1D5ux7o9F2gTukDpZXUKGD9JdLIgQlFLs4D0hfyS3dij8N24K jO0A/0eTumXl7Csu7Hrp2+b9XGsvdbQhfol4NxfBnNDoms92boFpEU7PU+c5nNz4Dkhe qiHL2yU9Z6UQLiZNOieq7Jn+K2rpGl+ZpM3GbYrKG94oNbaz9RprtH+3VO3483I9GY5B 1Y9/buXw8ND61cIbJyRAz9nHnJOPeV1wGFsto1RCEZUnfm4d/pw93UZq9UNTztVX4GF3 42+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720460869; x=1721065669; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ft3BQ35r6eQv2/5L7DcuubLp/BcVcWMiCmprNGFBEAo=; b=NkYA1InZXWFNup5N1zRJTLSpGVPz//CbjKtZaByckXvo072Jk/r2+5Q5039eiMmhd/ uNerikgvyccjnFGIaY1qKhXpDpBaCUPHn8do68Wesbdaq5BY0vDVaGBsclqfFM478Ml5 UWQ+vXDs3XjBtyhBRrmHHokuszfemJ+ePbxH6B4P8H65mTiQcvDGVom1NON7XOKJs/kC Sa03kC/ql9Grt17BIQK1YJgO5+Gwh+MIZfvcPsA6fjIu0DE0P8iLvVClMKDeNgUPm4DM 4Fbzzcq/al4PAaYOaEmJYN1MhJdaolKHWfgQrhMCA6Bbm1mbdxsfGGLsqjQA0csYQQC3 vFUg== X-Forwarded-Encrypted: i=1; AJvYcCUlJ7tXfIVtlKq/8xm1hiAxIwFDviVbwQsJXKG0tT02mSxo/4u4LFtTAF/QLsGqdxFHzp+N0o4O/hXL1tmfkkacbY8WFvPC X-Gm-Message-State: AOJu0Yx0IdnJ8Pk3Uu0xQQZgGFbOxxKFIhstQs8UubWgf+oxFu8FcwSu 7hIAR7lZbEIgJ6vdQvr9Y9k73kLVesux70AqHwB/Zfd47Tr2Fv+M X-Google-Smtp-Source: AGHT+IEiKLVrgxd6LZISjqXGjLNDgMNW57SVc57yDTlM6oacuZnGXKPw2cFiLX5kibvE7vD190wQXg== X-Received: by 2002:a1c:7703:0:b0:426:5d20:3f8e with SMTP id 5b1f17b1804b1-426707e1f64mr1767005e9.20.1720460868694; Mon, 08 Jul 2024 10:47:48 -0700 (PDT) Original-Received: from keynux.home.arpa. ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4264d5101ffsm160814235e9.16.2024.07.08.10.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 10:47:48 -0700 (PDT) Original-Received: by keynux.home.arpa. (sSMTP sendmail emulation); Mon, 08 Jul 2024 19:47:46 +0200 In-Reply-To: <-t_b-eMlmOCn1_vFdAmz9waZjs7MjLMZYRZVXJA3NXssGUg92uCVXGpvbYwFJWOfrwcigbCc6tP3SxPlpPuebgW_SdhWSAQguDd6lSXj_Oc=@protonmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147122 Archived-At: Heime writes: > Why do I get "error: Invalid format operation %*" and how can I fix it ? > > > > (defun insert-labels-in-columns (monbf col1-labels col2-labels col3-labels) [...] It seems that your problem could be reproduce with this one line: (format "%-*s" 10 "label") It raises this error: (error "Invalid format operation %*") and, indeed, I don't see the format control "%*" anywhere in the 'format' documentation, so, it looks like it's not a valid format operation. If you just copy/pasted a C 'printf' format, you probably should use something like this instead: (format (format "%%-%ss" 10) "label") HTH, Bruno