Opened 18 years ago

Last modified 17 months ago

#2644 new defect

Empty lines are removed when importing into LyX-Code

Reported by: pelle@… Owned by: Richard Kimberly Heck
Priority: normal Milestone:
Component: lyxtext Version: 1.4.1
Severity: normal Keywords: fileformat
Cc: Richard Heck, Juergen Spitzmueller, Uwe Stöhr, lasgouttes

Description (last modified by lasgouttes)

When inserting "Plain Text as Lines" into a LyX-Code environment, empty lines are removed. This is clearly wrong.

Debian bug: http://bugs.debian.org/187500

Change History (23)

comment:1 by Uwe Stöhr, 18 years ago

Confirmed; when text is imported as lines into a LyX-code, LyX-note,
LyX-comment, or LyX-gray text environment, empty lines shouldn't be deleted.

comment:2 by lasgouttes, 18 years ago

Milestone: 1.4.x

comment:3 by Richard Heck, 17 years ago

Milestone: 1.4.x1.5.x

Moving all bugs targeted to before 1.5.0 to 1.5.x.

If these are yours, please check that they have not been fixed and, if so, close
them.

Otherwise, sorry for the spam.

comment:4 by Juergen Spitzmueller, 15 years ago

Milestone: 1.5.x1.6.x

1.5.x is frozen. Shifting all 1.5.x-targetted bugs to 1.6.x.

If you have reported this bug, please verify if it still occurs in 1.6.0 and
close the report, if not.

comment:5 by ps, 15 years ago

Priority: highnormal

comment:6 by Richard Heck, 13 years ago

Description: modified (diff)
Milestone: 1.6.x2.1.0

Doing this correctly means adding an InsetLayout tag that would tell us whether to preserve blank lines, I think.

comment:7 by lasgouttes, 13 years ago

Description: modified (diff)

Why an InsetLayout? There is no inset except lyx notes mentionned by Uwe (but in this cases it is normal to remove empty lines)

Concerning plain layouts, we have the KeepEmpty tag that can be used.

comment:8 by Uwe Stöhr, 11 years ago

Milestone: 2.1.0

too late for LyX 2.1

comment:9 by lasgouttes, 9 years ago

Cc: Richard Heck Juergen Spitzmueller Uwe Stöhr added
Component: generallyxtext
Milestone: 2.2.0
Owner: changed from lasgouttes to Richard Heck

Let's come back to this oldish bug. The bug still stands, but we already honor KeepEmpty as we should. The funny thing is the LyX-Code does not have KeepEmpty set to 1. When one inserts into an ERT inset, everything is fine.

So the question is whether we shall set keepempty=1 for LyX-Code. One problem with that is that it does not honor multiple consecutive empty lines. But this may not be a very big problem.

comment:10 by lasgouttes, 9 years ago

So what shall I do? Close the bug as invalid or change the definition of LyX-Code? I have verified that the code is actually correct (although it should respect allowMultipar() --- I have a fix for that).

As for LyX-Code, it should be killed in favor of alltt, although I do not know whether it would change document layout a lot.

comment:11 by Richard Heck, 9 years ago

Not sure. I don't use that layout myself, so I have no strong view. Do as you think best, it seems to me.

in reply to:  10 comment:12 by Juergen Spitzmueller, 9 years ago

Replying to lasgouttes:

As for LyX-Code, it should be killed in favor of alltt, although I do not know whether it would change document layout a lot.

We could do the change and retain the old LyX-Code (via local layout) for old documents, but do not provide it anymore for new ones.

comment:13 by Scott Kostyshak, 9 years ago

JMarc anything you want to do with this for 2.2.0?

comment:14 by Scott Kostyshak, 8 years ago

Cc: lasgouttes added

CC'ing JMarc. Since no one else gave an opinion, I suggest as Richard to do as you think best.

comment:15 by lasgouttes, 8 years ago

Getting rid of LyX-Code would be nice indeed. This is a remnant of the past. I don't know how to do what Juergen proposes, though.

comment:16 by Scott Kostyshak, 8 years ago

Time is running out if we want to solve this for 2.2.0.

comment:17 by Scott Kostyshak, 8 years ago

Keywords: fileformat added
Milestone: 2.2.02.3.0

Jürgen does not have any time and it seems he is the only one that might fix this. I will put this as 2.3.0 since it seems there is agreement on what to do (get rid of LyX-Code but retain the old LyX-Code (via local layout) for old documents.

comment:18 by lasgouttes, 8 years ago

Instead of a local layout it may be better to use a module.

comment:19 by Scott Kostyshak, 7 years ago

Is anyone planning to work on retiring LyX-Code for 2.3.0?

comment:20 by lasgouttes, 7 years ago

Not me unfortunately.

comment:21 by Uwe Stöhr, 7 years ago

Milestone: 2.3.02.4.0

comment:22 by Richard Kimberly Heck, 6 years ago

Owner: changed from Richard Heck to Richard Kimberly Heck

comment:23 by Scott Kostyshak, 17 months ago

Milestone: 2.4.0

I don't see any recent work in progress for this bug. I'm removing the milestone. If anyone would like to work on this for 2.4.0, please let me know as soon as possible and set the milestone to 2.4.0 so we can discuss it.

Note: See TracTickets for help on using tickets.