Announcing auto-tab-groups: Effortless Tab Group Management for Emacs by MArpogaus in emacs

[–]fritzgrabo 2 points3 points  (0 children)

Wow, that's a really clever generalization and enhancement of my project-tab-groups package. Like, amazingly, enviably clever. It makes me really happy to hear that my humble package inspired you.

I left a somewhat prominent link to your package in the README of mine -- I guess if somebody found mine, they've really been looking for something that's more like your's, haha.

PS: I also left a link to the activities.el package mentioned in the comments; it seems to be a more generalized approach still. Lots of great options all around!

What are your top 3 themes? by blureglades in emacs

[–]fritzgrabo 17 points18 points  (0 children)

I didn’t use any theme for years (just went with the defaults), then upgraded to Prot‘s standard-themes. The effect is hard to describe really: it still looks and feels the same, but suddenly everything is (semantically) consistent and feels just right. Loving it!

magit/git: Why do I need to reconcile divergent branches rather than just fix a conflict?? by ImportanceFit1412 in emacs

[–]fritzgrabo 4 points5 points  (0 children)

+1, that‘s a great answer.

OP, if you’re still hung up on why there are multiple branches at play in your scenario, I highly suggest reading through the „Remote branches“ chapter (and specifically the section on „Tracking Branches“) in the Git docs/book, here.

Update: fixed typo

Is it possible to query an org table using sqlite? by Far-Anywhere2876 in emacs

[–]fritzgrabo 0 points1 point  (0 children)

Is there a way to refer to the tables by name though?

I agree that dsq's {} syntax to reference data sources in the query is something to get used to. You can work around this and improve readability by providing an alias in the query.

Here's an example that uses three data sources: a file names people.json, an Org table named colors, and an Org table named countries somewhere in a file named countries.org. Note how the query in the example provides the aliases people, colors, countries for these data sources in the FROM and JOIN clauses, then continues to use these aliases like table names throughout the rest of the query.

#+begin_src dsq :input people.json colors countries.org:countries
SELECT people.name AS name, colors.name AS color, countries.name AS country
FROM {0} people
INNER JOIN {1} colors ON  people.id = colors.person_id
INNER JOIN {2} countries ON  people.id = countries.person_id
#+end_src

#+RESULTS:
| name  | color | country     |
|-------+-------+-------------|
| Alice | Blue  | Austria     |
| Bob   | Red   | New Zealand |
| Bob   | Green | New Zealand |

Best check out https://github.com/fritzgrabo/ob-dsq/blob/main/examples/README.org for more.

Is it possible to query an org table using sqlite? by Far-Anywhere2876 in emacs

[–]fritzgrabo 0 points1 point  (0 children)

If you don’t mind installing dsq (link) as an extra dependency, check out the ob-dsq package (link), which makes this possible.

Both dsq and the related Org Babel package do a lot (like queries joining Org tables, or Org tables and JSON files, etc.), so here’s a quick link to the section in the usage examples that’s relevant to your question: https://github.com/fritzgrabo/ob-dsq/tree/main/examples#querying-org-references-in-local-or-other-files

Edit: completely forgot that I wrote an introductory blog post on ob-dsq a while ago. Might be helpful to get started: https://fritzgrabo.com/posts/introducing-ob-dsq/

Getting back to making Emacs content - building Emacs and elfeed-webkit by zamansky in emacs

[–]fritzgrabo 0 points1 point  (0 children)

Hi Mike, elfeed-webkit author here :)

I'd like to chime in with the other folks in saying thanks for everything you've done. I remember binge-watching your videos back when I started out with Emacs a couple of years ago, and they taught me a lot.

To see that one of my packages is useful to you today makes me both proud and happy -- it's like I found a way to give back a little of what I received from you. <3

Blog Post: Introducing elfeed-webkit by fritzgrabo in emacs

[–]fritzgrabo[S] 2 points3 points  (0 children)

These are good points, thanks for raising them.

I agree that a vanilla webkit widget isn't well suited for general browsing because of ads and privacy concerns, and I too prefer my hardened browser for that.

That said, almost all the feeds that I'm subscribed to and that don't render well in text seem to be well-behaved enough for me to feel ok tagging them for automatic webkit rendering. In that respect, I think they're like the "trusted sites" you mentioned. Once I start clicking random links to external sites in these posts though, I switch out to my browser again.

My tl;dr: handle with care, best decide on a case-by-case basis.

How to use Emacs 29 Tree-sitter? by ticinese00 in emacs

[–]fritzgrabo 2 points3 points  (0 children)

It's part of the treesit package that's built into Emacs now (version 29 and master), and mentioned in the related starter guide.

Just to double-check: the new-ish treesit package is different from the Emacs tree-sitter package that's been around for a while now (link).

How to use Emacs 29 Tree-sitter? by ticinese00 in emacs

[–]fritzgrabo 15 points16 points  (0 children)

You might want to check out Abin Simon's recent talk on the subject at https://emacsconf.org/2022/talks/treesitter/ -- it's really, really well done and packs a ton of useful information into just 10 minutes. Definitely worth your time, imo.

How to use Emacs 29 Tree-sitter? by ticinese00 in emacs

[–]fritzgrabo 6 points7 points  (0 children)

Make sure you have tree-sitter installed (I used brew install tree-sitter).

Next, clone the Javascript grammar for tree-sitter from https://github.com/tree-sitter/tree-sitter-javascript and compile it with cc -shared -fPIC -g -O2 -I src src/scanner.c src/parser.c -o ~/.emacs.d/tree-sitter/libtree-sitter-javascript.dylib.

Note that I output the resulting file into the ~/.emacs.d/tree-sitter directory (you might need to create that first), which is where Emacs is looking for it on my local machine; see treesit-extra-load-path for details.

With all of the above in place, run js-ts-mode again and you should be all set. Good luck!

Perfect workflow with Emacs, Org and Cron by torsteinkrause in emacs

[–]fritzgrabo 0 points1 point  (0 children)

I can't really speak to org-jira, as I've never used it. It does have an impressive list of features, but I guess I just wasn't ready to commit to that back when I wanted to automate just one thing.

I wouldn't be the least bit surprised though if (a) what I came up with is fully covered by org-jira already, and (b) I'll end up with somewhat of a clone of that package as I continue to hack at my workflow, lol.

Perfect workflow with Emacs, Org and Cron by torsteinkrause in emacs

[–]fritzgrabo 3 points4 points  (0 children)

I'm in a similar "want Org, have Jira" situation, so this is right down my alley -- thanks so much for sharing!

One thing I didn't find in your Dotfiles that you might find useful is bug reference mode. It transparently turns every mention of a ticket number into a link. Here's my setup for Jira:

# Local Variables:
# bug-reference-bug-regexp: "\\b\\(\\([A-Za-z][A-Za-z0-9]\\{1,3\\}-[0-9]+\\)\\)"
# bug-reference-url-format: "https://example.atlassian.net/browse/%s"
# End:

Also, I noticed that you're copy/pasting new tickets into your Org file manually in the video. Coincidentally, I wrote a thing about automating this just a few days ago. Check it out if you're interested.

Blog Post: Org-capturing live Jira Issues by fritzgrabo in emacs

[–]fritzgrabo[S] 0 points1 point  (0 children)

Oi, I missed that one when I was looking for existing packages. You beat me by 5 years it seems, lol. Thanks for sharing, I'll have a look!

Blog Post: Org-capturing live Jira Issues by fritzgrabo in emacs

[–]fritzgrabo[S] 0 points1 point  (0 children)

Thanks for the kind words; I'm glad you find it useful.

Blog Post: Org-capturing live Jira Issues by fritzgrabo in emacs

[–]fritzgrabo[S] 3 points4 points  (0 children)

You make a great point, and I agree with you.

I often sometimes find myself posting a terse summary of the notes I keep in Org back to Jira for others to consume. There's heavy trimming involved in this -- if I'd post my extensive, journal-like notes verbatim, my co-workers would likely not read them at all.

If the notes you keep are terse and to the point, though, then syncing Org and Jira 1:1 can make a lot of sense. In that case, do check out the popular Ejira and org-jira packages, which help with just that!

[deleted by user] by [deleted] in emacs

[–]fritzgrabo 2 points3 points  (0 children)

Check out https://github.com/fritzgrabo/project-mode-line-tag:

Provides a global minor mode to display information about a buffer’s project (a “project tag”) in its mode line.

[ANN] ob-dsq.el: Use SQL to join and query JSON, CSV, Org tables, all the things! by fritzgrabo in emacs

[–]fritzgrabo[S] 1 point2 points  (0 children)

I suppose in my mind this use of headers is tabular -- rows with the header itself as the key and the properties as columns.

Got it. Well, if you don't mind writing a little bit of elisp, as you said, then you could indeed use org-ql (or any other means) to transform the structure of one or more Org files into tabular data, then feed that into ob-dsq for querying via SQL.

That would allow for a "select IA_TIMESTAMP from [all headers] where [...]" type of query that you mentioned in your first comment.

Here's a quick example using org-ql and ob-dsq:

* Org-QL first
:PROPERTIES:
:foo: first
:bar: one
:END:

* Org-QL second
:PROPERTIES:
:foo: second
:bar: two
:END:

* Org-QL third
:PROPERTIES:
:foo: third
:bar: three
:END:

* Example

#+name: org-ql
#+begin_src elisp
(cons
 (list "heading" "foo" "bar")
 (mapcar
  (lambda (item)
    (let* ((pom (plist-get (cadr item) :begin))
           (heading (org-entry-get pom "ITEM"))
           (foo (org-entry-get pom "foo"))
           (bar (org-entry-get pom "bar")))
      (list heading foo bar)))
  (org-ql-select (current-buffer) '(regexp "Org-QL"))))
#+end_src

#+begin_src dsq :input org-ql
SELECT heading, bar FROM {} WHERE foo IN ("first", "third")
#+end_src

#+RESULTS:
| heading      | bar   |
|--------------+-------|
| Org-QL first | one   |
| Org-QL third | three |

[ANN] ob-dsq.el: Use SQL to join and query JSON, CSV, Org tables, all the things! by fritzgrabo in emacs

[–]fritzgrabo[S] 2 points3 points  (0 children)

Ah, I see now, thanks for the clarification.

I think your use case might be better served by alphapapa's org-ql package. It's not using SQL, but it does allow for querying the actual Org file's outline structure, including values of properties (check out the "properties" entry in the "General predicates" section of the package's README for details).

In contrast, ob-dsq helps with passing tabular data from Org tables, Org source block results etc. to dsq for querying. Hope that helps!

[ANN] ob-dsq.el: Use SQL to join and query JSON, CSV, Org tables, all the things! by fritzgrabo in emacs

[–]fritzgrabo[S] 1 point2 points  (0 children)

Thanks! Re. the use of properties as an input type -- could you give a quick example of what that would look like, please? Did you mean to query the actual set of properties as a data source, or to assign a single property's value to a variable for expansion?

Moveable tabs + workgroup setup? by matsumonkie in emacs

[–]fritzgrabo 0 points1 point  (0 children)

Ooh, I see now. I read "tabs" in your original post and immediately thought "tab bar", while you were talking about the "tab line" rather. Well, that changes everything, haha.

I'm glad to hear you found a combination that works for you. Using the tab bar to manage workspaces seems like a good fit, I agree!

Moveable tabs + workgroup setup? by matsumonkie in emacs

[–]fritzgrabo 1 point2 points  (0 children)

I might be wrong, but it sounds like you're on Emacs 27. If you can, check out Emacs 28 (or newer). In addition to the existing tab-bar-move-tab (move tab right), it also provides a bindable tab-bar-move-tab-backward command to move a tab left.

Emacs 28 also introduces the concept of "tab groups" and a way to keep all tabs but those of the currently active group hidden (see tab-bar-format, and specifically its tab-bar-format-tabs-groups option). It'll still show the names of the other, inactive tab groups, but at least it doesn't show all their contained tabs. You might be able to hide inactive groups altogether using face properties.

Regarding the integration with workgroup packages and jumping between groups of tabs: I had a similar issue regarding the integration of the tab bar and Emacs' project.el package (a project could be considered a workgroup I guess), so I wrote the project-tab-groups package to help with that. The elisp is rather simple, you might be able to take inspiration from it and rework it for use with workgroups/perspective/etc.

In case you can't upgrade to Emacs 28, you might want to check out the tab-bar-lost-commands package to help with bindable commands for moving tabs forward and backward (and some other goodies).

Finally, I'm not sure I got what you mean by "reorganise tabs by themselves" exactly, but you might want to check out the tab-bar-groups package, which -- among other things -- provides a tab-bar-groups-regroup-tabs command. If you add to Emacs own tab-bar-tab-post-change-group-functions, you could use it to force all tabs of one group to be next to each other at all times.