Use this document with search query and two projects:
report @search(@done = [d] today and not @unplanned )
First:
- First
- Second @today @done(2016-04-06)
Second:
- First @done(2016-04-06)
- Second @done(2016-04-06) @unplanned
Use search query
Copy the results
Paste the results in another app
Expected result:
First:
- Second @today @done(2016-04-06)
Second:
- First @done(2016-04-06)
Actual result:
First:
- First
- Second @today @done(2016-04-06)
Second:
- First @done(2016-04-06)
In result copyed all projects and tasksdocument without search filters
Hi, this is actually how it’s intended to work right now, though that behavior might be changed the the future. Please check out (and send in your ideas for improvement) this related post:
For a second mode of copying (only the visible lines in the selection) perhaps a script attached to ⌘⌥C ?
Possibly something like this:
(To test in Script Editor, set the language selector to JavaScript)
// COPY ONLY THE SELECTED LINES WHICH ARE VISIBLE IN TASKPAPER 3
// (not copying lines which are folded or filtered away)
(function () {
'use strict';
function TaskPaperContext(editor) {
// Only the visible component of the selection
return editor
.selection
.selectedItems
.filter(function (item) {
return editor.isDisplayed(item);
})
.map(function (item) {
return Array(item.depth)
.join('\t') + item.bodyString;
})
.join('\n');
}
var ds = Application("com.hogbaysoftware.TaskPaper3")
.documents,
d = ds.length ? ds[0] : undefined;
if (d) {
// COPY THE VISIBLE LINES WHICH ARE SELECTED
var a = Application.currentApplication(),
sa = (a.includeStandardAdditions = true, a),
strLines = d.evaluate({
script: TaskPaperContext.toString()
});
sa.setTheClipboardTo(
strLines
);
return strLines;
}
})();
@jessegrosjean ok. Thank you. I’m Agree with hybrid options with deleting in filtered view. However, it is strange and not intuitive for me when copying filtered data, because i thinked about filtered data and i needed only this data in this context.