emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: sebastien.miquel@posteo.eu
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] extra space at the end of lines in source
Date: Thu, 24 Jun 2021 11:55:31 +0300	[thread overview]
Message-ID: <2913163.1624524931@apollo2.minshall.org> (raw)
In-Reply-To: Your message of "Wed, 23 Jun 2021 17:29:42 +0000." <c91cb5f1-44ff-f29b-b63d-7024d130f78a@posteo.eu>

Sébastien Miquel,

> If I try your original examples with `emacs -q' I do not get extra
> whitespace in the org src buffer. Those two spaces in the original org
> buffer -- that are due to `org-edit-src-content-indentation' -- are
> removed in the org src buffer. If you do not find it to be the case,
> then I'm missing something.

i apologize, i think i described the problem badly.  the problem i saw
is not extra spaces in the Org Src buffer; it is the appearance of the
extra spaces in the original .org file after closing (C-c ') the Org Src
buffer that i see as problematic.

> Anyway, here's a patch that cleans up blank lines, except the current
> one. It preserves the fix for the original issue.

thanks.  my trivial test shows this works *except* in the particular
case where, when closing the Org Src buffer, `point` is on an empty
line.  in this case, that one empty line is given extra spaces.

if i try my test with
: Org mode version 9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)
i do not see the extra spaces in the .org file.

the test src block is
#+BEGIN_SRC bash
  echo hello, world

  echo 23

(modulo any e-mail mangling).

again, thanks.  Greg

  reply	other threads:[~2021-06-24  8:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 11:35 extra space at the end of lines in source Greg Minshall
2021-06-22 13:45 ` Sébastien Miquel
2021-06-22 19:21   ` Greg Minshall
2021-06-22 21:00     ` Sébastien Miquel
2021-06-23  4:08       ` Greg Minshall
2021-06-23  6:08         ` Tim Cross
2021-06-23 17:29         ` [PATCH] " Sébastien Miquel
2021-06-24  8:55           ` Greg Minshall [this message]
2021-06-26  8:37             ` Sébastien Miquel
2021-06-26 15:53               ` Greg Minshall
2021-07-10 14:27               ` Greg Minshall
2021-09-26  5:48               ` Bastien
2021-09-26 13:40                 ` Greg Minshall
2021-06-22 23:56     ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2913163.1624524931@apollo2.minshall.org \
    --to=minshall@umich.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastien.miquel@posteo.eu \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).