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

:PROPERTIES: or --- Extracted as Title on all files listed rather than #+TITLE or yaml frontmatter title: #21

Closed
wakatara opened this issue Jan 30, 2023 · 4 comments

Comments

@wakatara
Copy link

(apologies, src.ht does not have an issue tracking functionality... :-/ Unless I missed it when I signed up.).

Loving xeft and how fast it is. However, as I use org-roam, I have a :PROPERTIES: block at the top of every org-mode file. There is also a #+TITLE in each file (as well as most of my md files have yaml frontmatter with title: in them.

I'm guessing xeft takes the first line of the file as title so I'm seeing a lot of :PROPERTIES: which makes it impossible to distinguish the files well even after filtering (unless for some reason it does look for titles, but PROPERTIES somehow throws it off.

So two possible things which would be great:

  1. Use filename as title with "shortpath" for directories ie (~/Documents/org/areas/blog/ becomes ~D/o/a/b in display)
  2. Extract title blocks from the documents when they're indexed for major modes like org, md, adoc

Thanks for your hard work on this. It's really great. Enjoying it and the way it works with org-roam... =]

(ps> also, if you could add the cutomization options possible in the README that would be great. I tried changing the title font for example by hooking it into my nano theme, but failed ).

Example top of template file in case thta helps if it is a bug

:PROPERTIES:
:ID:       6B58FF53-C8A1-47F3-B374-CD67FB95C327
:END:
#+TITLE: The Rust Programming Language
#+CREATED: [2023-01-22 Sun]
#+MODIFIED: [2023-01-30 Mon 16:26]

* The Rust Programming Language
:PROPERTIES:
:Type: book
:Start: <2023-01-22 Sun>
:Fin: 
:Killed: 
:Rating: 
:Digested: 
:Creator: Steve Klabnik
:URL:
:END:

Stuffy stuff notes I took on the book... 

@casouri
Copy link
Owner

casouri commented Jan 30, 2023

(apologies, src.ht does not have an issue tracking functionality... :-/ Unless I missed it when I signed up.).

That's my fault, I didn't configure the repository correctly, I'm new to sr.ht ;-)

Loving xeft and how fast it is.

Thanks for the kind words 😊

Use filename as title with "shortpath" for directories ie (~/Documents/org/areas/blog/ becomes ~D/o/a/b in display)

Extract title blocks from the documents when they're indexed for major modes like org, md, adoc

I added a new variable xeft-title-function, you can customize it to produce "short paths", the default implementation is improved to handle #+TITLE: that's not on the first line: the original implementation does handle it but assumes it's on the first line.

(ps> also, if you could add the cutomization options possible in the README that would be great. I tried changing the title font for example by hooking it into my nano theme, but failed ).

I added description of other customization variables in README. For the title, you want to change the xeft-excerpt-title face.

@wakatara
Copy link
Author

Cool! Wow, thanks for adding those things in so quickly. Impressed. 8-]

I just pulled the latest code via straight though and am getting the following error compiling the dynamic module (which worked before with the config I had in straight)

c++ xapian-lite.cc -o xapian-lite.dylib -shared -fPIC -I/include -std=c++11 -L/lib -lxapian
xapian-lite.cc:40:10: fatal error: 'xapian.h' file not found
#include <xapian.h>
         ^~~~~~~~~~
1 error generated.
make: *** [xapian-lite.dylib] Error 1
c++ xapian-lite.cc -o xapian-lite.dylib -shared -fPIC -I/opt/local//include -std=c++11 -L/opt/local//lib -lxapian
xapian-lite.cc:40:10: fatal error: 'xapian.h' file not found
#include <xapian.h>
         ^~~~~~~~~~
1 error generated.
make: *** [xapian-lite.dylib] Error 1

Do we need the header file included? (I could not recall if it was in the last version or not.). Headers are being copied over to the build directory though so I think this is either a missed file or pointing at the wrong thing.

Or lemme know if it a strange "homebrew on M1 mac" issue due to directories. =]

@casouri
Copy link
Owner

casouri commented Jan 31, 2023

The header file is provided by the xapian package, which in turn should be installed by system package manager. I think you want to use /opt/homebrew for PREFIX when compiling the dynamic module. That's where homebrew install libraries, IIUC.

@wakatara
Copy link
Author

Doh. Yes, /opt/homebrew/. Obviously, I am flipping between linux and osx too much. #facepalm

Compiles now. Will kick the tires and let you know, though looks great with the titles showing now! Thank you!! 😍

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

2 participants