From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SE8LDX6kTmRxSAEASxT56A (envelope-from ) for ; Sun, 30 Apr 2023 19:25:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CCv9C36kTmSKHAEAG6o9tA (envelope-from ) for ; Sun, 30 Apr 2023 19:25:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C850F2B7E3 for ; Sun, 30 Apr 2023 19:25:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptAmr-000819-4O; Sun, 30 Apr 2023 13:24:37 -0400 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 1ptAmp-000810-IB for emacs-orgmode@gnu.org; Sun, 30 Apr 2023 13:24:36 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptAmm-0007bt-NJ for emacs-orgmode@gnu.org; Sun, 30 Apr 2023 13:24:35 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1F9AD240125 for ; Sun, 30 Apr 2023 19:24:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682875470; bh=Mzv9F0XmqjorM76u0UN/39u3pnqkVV0TOXPWK7E4T6s=; h=From:To:Cc:Subject:Date:From; b=XjKEETSE1w7n7hDqCOAyc+4+xDvW8g1xcBgBoO7d23yoVcjoXxawkegWGgx3H3VFf w0VzT88zIDEii//O1AX4m+QsqZxBwRyt0Vr0BBZToGL/YZPDBh7KOfuWT0vis0LZDA fBs/IlA/kuyX0/3aq9eQTg0lNF4Q63FBMuvEaNerZz7KgzzJCXyISsA5RI9f2p0Gjf yX63bdnz7jGwdLzUZNopmsQgaOf8wyFGQj4EHwOS/iiBJq4yiT+o9JGPHwVKiMaVCg C3rFQLhTNoSXZMz4iWLEUkXRB4j6Ce6I3K6bs3aZQL1C4s9e2sV8RjY0nAYSk4gASW ne5eo4519sjQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q8Y9n50Pqz6tvh; Sun, 30 Apr 2023 19:24:29 +0200 (CEST) From: Ihor Radchenko To: Damien Cassou Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] [PATCH] org-odt-plain-text: Fix when text contains only spaces [9.7-pre (release_9.6.4-346-g7d41bd @ /home/cassou/.emacs.d/lib/org/lisp/)] In-Reply-To: <87ttwxphm6.fsf@cassou.me> References: <87ttwxphm6.fsf@cassou.me> Date: Sun, 30 Apr 2023 17:27:33 +0000 Message-ID: <87v8hdz3ei.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682875517; a=rsa-sha256; cv=none; b=huYmhNkpHpKrv36s6847+XozqCoMYCtDA/7tY2c/MuDRqbChaJFi/brBikVRByCYzJVlaF X3qfJAjs5tCXjVl7k1ASU9ZOZlYRjmBuMhrcyeAaYE3o5OyPrrWDYFMeCeGfZ5Kz7MeBj9 mhQrfgfdKF9ZI95Mhpes1DX79cXrO6fnQYEJGFNbKH6iUqt+w/ww+6aogcbpd4MI5478ES lzIcjupKDq3osfWI9bjIKq2wLy486omEuT4CeMN2lzv0O5G92UihHf4o1vvVVEmiVmAt3L tHeR2xcNSqBLvYeYTUvXjb16qCog4PsCmkY44jQQiG7DHpEaCsZnigEYL2uVww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XjKEETSE; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682875517; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Xc9Y8BYctPACImnlaNdK7WKhkLyvv2zixIpvXARG9Ms=; b=ND2vNUscp9VWp53PCy138TdtoTh7vM+qDJ+Gwu31azqba33HItPVvGAOfE47Z2obEfGMgI ZFqtvAl4zJc4XHYwyX+c7OITwbzWJfulDyl/jtbZ3lJZhKgMPAVoR7DzWtt6xnus24siWr Y0rb+kJaxVJZJHcHqWeVNg8PtjOYwNIwCXW48jJRX+dPe5Lxag5wHEztkBJ4t5gMoBQ/bt 5wmUk5BQM3tzOkUe1EJWpbVj0xZcOuX3FhZsUsKWGnNfeKsZoZEoZkm9tqnT6PZDo3JaoA l1cy0Bmn3l2LzoWFBp6Cid5ZjEV9AP8T39KTNsE/6//MJsyjfCUQVjOl1jzbEQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XjKEETSE; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.69 X-Spam-Score: -4.69 X-Migadu-Queue-Id: C850F2B7E3 X-TUID: Vj1eK7nCszMH Damien Cassou writes: > in [1], Ihor fixed a bug I reported in ox-odt. Unfortunately, this fix > broke figures with several lines of captions such as: > > #+CAPTION: first line, > #+CAPTION: second line > [[file:media/myPicture.png]] > > This is because, in this case, org-odt-plain-text is called at some > point with " " as value for `text`. In this context, both `leading` and > `trailing` temporary variables contain the same value as `text`, making > the `substring` call crash. Thanks for the heads-up! Fixed, on bugfix. Alongside with a couple of ox-odt improvements on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c756f8a85 https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c265d964f https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a686c7b60 > The attached patch fixes the issue by considering that there is no > leading/trailing content when the input only contains spaces. I used an alternative approach. Canceled. (for the patch) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at