[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hyperbole-web-search-alist

From: Jean Louis
Subject: Re: hyperbole-web-search-alist
Date: Wed, 12 May 2021 11:00:21 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Dr. Erich Ruff <dr.erich.ruff@t-online.de> [2021-05-12 10:09]:
> Dear Jean,
> thank you very much for your explanation in the other mails. I'm only a
> hobby-programmer and new to elisp.
> 1) What with  hyperbolahv-web-search-alist

Standard way would be to customize the variable by using Emacs
customize interface:

{M-x customize-variable RET hyperbole-web-search-alist RET}

I suggest doing that.

There is no need for pushing, or making new file or entering it
manually into init.el

> If "Leo" gets added via my .emacs it is not shown in the menu. If its a
> bug, pls could you fix it? - with my elisp-knowledge I can't do it.

I have used this:
{M-x customize-variable RET hyperbole-web-search-alist RET}

and it works.

> 2) I use a lot of books written before 1900 in the classic
> fontfamily: fraktur, so a search in the book is not possible.

I understand. But let us say not possible yet. Tesseract is one of
good OCR systems that recognize text and transform it into digital
text. I would say then:

- learn how to use tesseract, it does work well;

- apply Fraktur data files:
  https://github.com/paalberti/tesseract-dan-fraktur which can be part
  of your distribution. On my Parabola GNU/Linux-libre it is already
  part of the operating system

- convert into text by using Tesseract and Fraktur fonts

It is good to mention that Org has its specialized mailing list where
you can find vibrant, helpful people.

> Is it possible - like in org-mode - to create an explict button,
> which will open the pdf in emacs (pdf-tools) at a given page-nr?

I would say, if you wish those links to be part of Org file, then keep
it Org file. Org supports any kinds of hyperlinks, including
customized hyperlinks.

One solution from Emacs Wiki:

(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps '("\\.pdf::\\([0-9]+\\)\\'" . "evince \"%s\" -p 

then you can make links like:


But I assure you that Emacs alone can open specific PDF page as well, so 
command is following:

(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps '("\\.pdf::\\([0-9]+\\)\\'" . (lambda (file link) 
(my-find-file-pdf file link))))

(defun my-find-file-pdf (file link)
(when (string-match "[\\.pdf|::[:digit:]]$" link)
(let* ((extension (file-name-extension link))
       (page (string-match "::" extension))
       (page (when page (substring extension (+ 2 (string-match "::" 
  (find-file file)
  (when page
    (doc-view-goto-page (string-to-number page))))))

Then you make the link like:


and that one will open in Emacs.

If you wish to use external applications on GNU/Linux or
BSD-derivative operating systems, you could study commands below
to figure out how to use various external programs.

For example:

evince --page-index=PAGE
xpdf :PAGE file
okular -p PAGE

It would be also possible to define one function for PDF opening
where you can change the program without changing your Org PDF


Take action in Free Software Foundation campaigns:

Sign an open letter in support of Richard M. Stallman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]