Comments (3)
I haven't looked into this fully yet but at least limited abbreviation (that is, without any substitutions using %h and %s) shouldn't be hard to add to a new column
from org-sql.
I added partial support in 140a9f7. Please test and see if this works for you.
Regarding why this is only 'partial', org-element
will expand link abbreviations by itself, which means org-sql
only sees the expanded link and thus must do a reverse lookup in org-link-abbrev-alist
. This isn't a problem if the final expanded link has an exact match, but anything with %s
or %h
won't work because the tag information that subs into these replacement keys is effectively destroyed by the time the link reaches org-sql
. Of course there's hacky ways around this, but nothing I can come up with is very clean or performant.
from org-sql.
I tested with the following results:
- new column
link_abbrev
is visible in thelinks
table - only NULL value is there, i.e. no abbreviations were found in my org mode notes
- the value of
org-link-abbrev-alist
in my org config is non nil:
- the value of
(("goodreads" . "https://www.goodreads.com/book/show/%s")
("doomdir" . "/home/random/.doom.d/%s")
("doom-repo" . "https://github.com/doomemacs/doomemacs/%s")
("wikipedia" . "https://en.wikipedia.org/wiki/%s")
("google" . "https://google.com/search?q=")
...)
I'll inspect 2) furthemore.
Regarding the expansion I think the current solution is OK. The link abbreviation in the table tells me which logic was applied during the expansion (because the expansion logic is defined in the org-link-abbrev-list
), thus I can reconstruct it by custom SQL (reversing the expanded link_path)
from org-sql.
Related Issues (18)
- Will this package provide a simple web interface? HOT 4
- No prompt found or ‘comint-prompt-regexp’ not set properly HOT 3
- Plans? HOT 4
- Updating taking long / config problem? HOT 6
- Documentation error - "org-sqlite-db-path" should be "org-sql-sqlite-path" HOT 1
- Doesn't work on my system - solved with help of sqlite3 ".log" and ".trace" commands HOT 10
- clocking is empty HOT 26
- Hard-coded path to sqlite3 - No such a file or directory, /usr/bin/sqlite3 HOT 4
- Symbol’s function definition is void: org-ml-headline-get-logbook HOT 2
- f-write used, but f not "require"d HOT 1
- Effort not showing up in headlines table HOT 2
- swapped calls of 'org-sql-user-push' and 'org-sql-user-pull'
- `s-matches-p`: Wrong type argument HOT 3
- Error: in prepare, no such table HOT 2
- parse custom link types and add them to the links table HOT 1
- postgres process not closed
- can't see a file's #+title nor #+category HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org-sql.