0

I'm using outorg to convert an elisp file to an org file and then back to an elisp file via (outorg-convert-to-org) and (outorg-convert-back-to-code). When I do this conversion I notice that it looks like there is an extra newline between headlines and source blocks. On the image below the left is my original elisp file and the right is after the conversions. It seems as if the conversion added an extra newline between the comment and the code. However, when saving the contents of the buffers before and after conversion and testing for this via (string= original-buffer-contents after-conversion-contents) I get t. So the buffer contents are the same.

Upon further investigation, I can't move the cursor over the "extra newline". It always skips it. I suspect that there is no actual newline added to the buffer contents and this is some sort of visual (bug?) thing.

What's happening here? And how can I prevent this "extra newline" from displaying?

enter image description here

UPDATE: This is what is displayed when I use describe-char just before the (nonexistent?) newline. The character is described as a newline.

enter image description here

Another thing I found interesting is what happens when I try to delete it (e.g. by putting my curser before the (defvar and pressing backspace). If the extra newline existed, pressing backspace twice should leave the commented line on the line above (defvar line. However when I press backspace twice (the right window in the picture below) the two lines are joined on the same line indicating the extra new line is not really there.

The left window is the result of pressing backspace one time on the original buffer.

enter image description here

  • What does it say when you put your cursor on (just before) the newline char and use C-u C-x =? Sounds like there's perhaps an overlay with a display property. – Drew Mar 6 at 15:40
  • It just says that it's a regular new line. But it is ignored when I backspace it or try to put my cursor on it. – Aquaactress Mar 6 at 16:45
  • It's not clear where you're putting the cursor or what the output of C-u C-x = is. But if you're sure that doesn't help, OK. – Drew Mar 6 at 22:26
  • I am not sure what you mean. My cursor in the second picture I posted. Its the vertical blue line (after "machines"). And so is the output of describe-char. – Aquaactress Mar 7 at 1:41
0

You enabled whitespace visualization (Whitespace mode), you can disable the mode using M-x whitespace-mode. If you use the mode, you can change the option whitespace-style to choose which kind of whitespace to visualize.

| improve this answer | |
  • I only enabled whitespace mode to better demonstrate what was happening in my screenshots. The extra newline is displayed with or without whitespace mode. What I mean by "displayed" is not whitespace-mode's display. I mean that I can see an extra blank line on the screen even though it's not actually there (I can't put my cursor on it and the buffer contents have not changed). – Aquaactress Mar 6 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.