Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want TEdit to support links (URLs) in text #1951

Open
hjellinek opened this issue Jan 3, 2025 · 8 comments
Open

Want TEdit to support links (URLs) in text #1951

hjellinek opened this issue Jan 3, 2025 · 8 comments

Comments

@hjellinek
Copy link
Contributor

hjellinek commented Jan 3, 2025

@abhikhasnain1 is revising the Medley Primer, the source of which is a set of TEdit documents. The Primer refers to a number of other documents that include the IRM, some Lisp introductory books, etc. When the Primer was current, we expected readers to search for these texts by name. Nowadays we can do better.

The Primer would be so much better if, for instance, a sentence that now reads

- Power Tools For Programmers by Beau Sheil. It appeared in Datamation in February, 1983, Pages 131 - 144.

contained a link to, say, the PDF of that article:

- Power Tools For Programmers by Beau Sheil. It appeared in Datamation in February, 1983, Pages 131 - 144.

If it's hard or infeasible to make text spans act as links, some kind of URL/link imageobject would be almost as good:

- Power Tools For Programmers by Beau Sheil. It appeared in Datamation in February, 1983, Pages 131 - 144. {link}

I should mention that since the Primer is mostly used in PDF form, links in the source document should be rendered as links in the PDF "hardcopy" file. I wonder if we need to think about how/whether we can do that using the existing device-independent graphics/imagestream API.

@rmkaplan
Copy link
Contributor

rmkaplan commented Jan 3, 2025 via email

@hjellinek
Copy link
Contributor Author

You can define a link image object that would display its user-label in some obvious way (underlined italics?) There are a couple of schemes, in different add-ons, for augmenting the main Tedit menu to make it easy to insert objects. We probably ought to settle on one of those schemes, and build it in.

Sounds good. Can you describe the different schemes at a high level?

It strikes me that a sort of readmacro-like technique would be handy for adding links to a document. The user types a special key sequence in their TEdit text and is prompted for the URL.

@rmkaplan
Copy link
Contributor

rmkaplan commented Jan 4, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Jan 4, 2025

It strikes me that a sort of readmacro-like technique would be handy for adding links to a document. The user types a special key sequence in their TEdit text and is prompted for the URL.

The current key sequence is ctrl-O followed by an s-expr [say, (URL.CREATE)] that evals to prompt you for the URL and the text to display in the document and drops a (yet to be created) URL image object. In the same way that you do ctrl-O (HRULE.CREATE 5) to drop in a 5pt hrule.

@hjellinek
Copy link
Contributor Author

I was thinking of something even simpler, since this object is just for links, like typing "<<https://foo.bar CR" and having the link imageobj created and inserted. But the invocation technique is secondary to having the imageobj at all

@rmkaplan
Copy link
Contributor

rmkaplan commented Jan 4, 2025 via email

@hjellinek
Copy link
Contributor Author

Not exactly: I'd like TEdit to listen for a special key or key sequence, then prompt for or silently read a URL the user types and turn it into an embedded link.

@rmkaplan
Copy link
Contributor

rmkaplan commented Jan 4, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants