View Single Post
  #1  
Old 05-22-2023, 01:09 PM
Spliff Spliff is offline
Registered User
 
Join Date: 04-07-2021
Posts: 207
External editors REALLY needed for special use cases (i.e."non-print" control codes)?

I am (again) after something important here, since currently, or rather, just applying current user knowledge, it's not possible, with the integrated MS rtf editor (mine is RichEdit20W6, but I could change within the available alternatives; I don't need tables in Content e.g. ...), to search for, and thus, also to replace, or insert by replace, those "non-printable control-codes" (newlines, tabs in particular).

I speak of these, in particular, and for which some other - external then - editors provide special ways of input, with \something, `some, ^some or similar, and which seem (sic!) to be unattainable within UR's integrated MS rtf editor(s), or then, in UR's Data Explorer (which I call "tree", since I can remember that term oh so much more easily... ;-) )

I speak of these here:

typical Windows newline: CRLF:
CR = \r = dec 13 = hex 0D = oct 015 = ^M bin 00001101 (carriage return)
LF = \n = dec 10 = hex 0A = oct 012 = ^J bin 00001010 (line feed)
and also of importance:
HT = dec 9 = hex 09 = oct 011 = ^K bin 00001001 (tab)
EmEditor calls it 000B ("Insert - Special Characters" ^M abd ^J not found in EmEditor))

newline in PlanMaker (^{enter} (Control-Enter) = control-enter): 00001010 (checked by binary editor)
in Excel (by !{enter} (Alt-Enter): &CHAR(10) = linefeed (see above)


Their possible use is threefold (at least):

- Imagine you want to integrate TAGS into your UR item titles, in order to both enter them very easily, AND retrieve them effortlwithout any effort ("Search - Search titles only"), BUT without being bothered, visually, by those tabs (e.g. in the form {.some .someother} - obviously, a - loooong - tab is the solution... AND it's available, oh yes indeed: Just insert a tab (with the {tab} key) into the Content field somewhere, then ^c, then ^v within the "F2" rename within the Data Explorer... and you're done... so: technically, these "non-printable control codes ARE available indeed)...

and ditto for entering the clipboard content, i.e. that "bloody" tab, into the MS "Find" field: now, it works, so WHY wouldn't there be ANY - crazy, be it: I wouldn't mind: "enter" string, to enter into that "find" field, and which would give the very same, and positive, result?:

- You want fo FIND those control-codes within your Content (i.e. "ItemText"), by ^f...: I've found no way yet, but there possibly IS some way?

- And, much more important, and IF we have found a way to identify / designate these control codes within MS Editor's find/s&r dialogs: We would then be able to replace e.g.

"Character: Some dialog"

with

"CHARACTER
The same dialog"

at last, WITHIN UR (1 item by 1 item: ok, but then so what...), and similar tasks asking for identification and/or replacement or inserting of those control codes?

Wouldn't there be any way? I have to admit that I tried similar (and other) things with line feed, and with carriage return, to no avail, but once we could identify them in any way, there should a way? And even entering (by macro then anyway) a 12-char string: where would be the problem indeed?

And once the identification problem, and the problem of "how to then enter those bloody codes", would have been resolved, you could write the necessary code of just stopping the screen update and keyboard-n-mouse interaction, while processing, replacing it with a progress bar plus "Please wait - multi-item search-n-replace processing" message... and UR would get the multi-item S&R some Mac-only applications, not being backed up by SQLite (but presenting quite a bulk of other glitches if I may say so...), come up with...


Background of my research, question and development:

I currently have tried "hierarchical csv input into UR tree", and it works perfectly!

See here: https://www.kinook.com/Forum/showthread.php?t=2483 - "Importing hierarchical information from a csv file", and bear in mind that over there, the "Note: an IndentLevel value of 0 indicates no indent - the order of the records in the csv file is critical to defining the relationships between the records (when a record has a non-zero indentlevel value, it will become a child of the last preceding record with an indentlevel value one less than the record's value)." is not perfectly worded, since you might be inclined to assume indentlevel then was relative, whilst, very thankfully, it's absolute within the sub-tree newly created, just relative to the (existant) parent item of the new sub-tree: you import at item x, which is deemed to be indentlevel 0, and then any indentlevel in your csv / new sub-tree will have, relative to 0, exactly the number of more-indentations its indentlevel field notifies;

and yes, UR's csv import dialog lets you choose the field divider (which in most cases would be {tab}, but not also the record divider, so that one will be `r`n or `n, i.e. some newline, and thus, for the Content column / fields, you'll need the "" "text" indicator, and then it'll be up to your "original", source, application's export's control code's encodings, AND to the capabilities of your intermediate, editing applications, if your "newlines" will / CAN be correctly recognized by UR's csv import function, within the double-quoted (or otherwise defined) "Content" (i.e. "ItemText") and/or "Notes" columns - those columns in which newlines can create real problems indeed.

In any case, any fellow user is well advised to first create a tiny but significant "dummy" csv file to import, in order to then revise their csv data accordingly.


And, Kyle, thank you so very much again for your amending the "Tools - C&R" function!!!!


EDIT:
So-called "global S&R", better, multi-item S&R (i.e. "whole sub-tree"), is primordial for "writers", and, for journalists, etc., obviously, but becomes a necessity for coders - e.g., the (much lesser in every respect) "RightNote" comes with a dedicated "plain-text" template, especially for code writing... but there is no multi-item S&R either, so this, in their case, become, well... "weird"... . and, btw, RN's "dark mode" just changes colors all AROUND the "editor" (if I'm not wrong - after my trial some years ago, I don't have access but to their "Lite" version, and their web-available documentation...) - this being said, I'm not up to denigrate other personal information managers, but I would like to emphasize that S&R, beyond the current item, would open a very larger market than just the partial market of "writers" and other text-producing people who haven't yet switched to Mac-n-Scrivener... both decisions being devoid of sense, as far as I'm concerned, btw - and I analyzed the available goodies over there thoroughly, before making my final decision that is... ;-)

Last edited by Spliff; 05-22-2023 at 01:51 PM.
Reply With Quote