[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 153197] New: Append Enter to Pipe to Terminal
From: Dominic Battre <dominic () battre ! de>
Date: 2007-11-30 21:26:56
Message-ID: 20071130222655.153197.dominic () battre ! de
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=153197
Summary: Append Enter to Pipe to Terminal
Product: kate
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kwrite-devel kde org
ReportedBy: dominic battre de
Version: (using KDE Devel)
Installed from: Compiled sources
Executive Summary: I would like the "Pipe to Terminal" command append a \n to the last line.
This is the reasoning behind it:
I am using kate to write scripts for R (http://www.r-project.org/). R runs in the terminal and \
I want to submit code from the file I am editing to R frequently.
Suppose the R script contains these lines (just some example):
a <- 1:10;
print(a);
print(rev(a));
Now you select the first two lines with the mouse cursor. This selects the following content \
(... shows what is highlighted): |a <- 1:10;.........................|
> print(a); |
> print(rev(a)); |
i.e. the \n after "print(a);" is NOT selected.
If I pipe this to the terminal, the last line is NOT executed.
I have attached a patch that introduces a new action which does the same as "Pipe to Terminal" \
but unconditionally adds one \n. This helps me a lot.
I see the following questions regarding the patch:
- I am not sure whether there should be a second menu item (clutters the menu), but sometimes \
one might want to pipe only a part of a line (select the "rev(a)" part and pipe this) - a \
shortcut would be sufficient for me, as I would not use the menu anyway.
- I am not sure what would be the best description for the command ("Pipe to Terminal and \
auto-confirm with Enter" is somewhat long).
- One could add a configuration option of the plugin that sets whether \n should always be \
added or never, but that takes the flexibility.
- One might be able to make the "Pipe to Terminal" action smarter: If the end-cursor is located \
at a EOL, a \n would be added, but I don't know how to do that.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic