Re: Org and multimedia (tips?)
On 18/03/2022 05:44, Juan Manuel Macías wrote: What I do is quite simple and rudimentary. For example, I have all my music files stored on a hard drive on my Raspberry. As a media server I use GNUMP3d, which is pretty clunky and outdated, but it works fine and is very easy for me to administer. GNUMP3d serves a local web page with the list of titles and artists. I convert that web to an Org node using org-web-tools (https://github.com/alphapapa/org-web-tools), and some extra elisp to clean up inconsistencies and format everything so that each artist/title is a sub-tree. The process is not quite fine-tuned: I have to see how labels and properties could be added automatically: music gender, year, etc. org-web-tools is an interesting project, but if you have access to files it should be easier to extract all meta information directly using e.g. exiftool -json file.mp3 or another tool suitable to particular format. It seems emms has interface to various tools. P.S. You may try to adapt common LISP implementation of ID3 parser https://gigamonkeys.com/book/practical-an-id3-parser.html
Re: Re: Problem with org-babel and geiser
Hello Rudy! On 3/18/22 17:00, emacs-orgmode-requ...@gnu.org wrote: Today, I needed to use Scheme with Org (9.5.2-24-g668205), and I found that the #+RESULTS: always come back empty. Oh, well! I use Guile and have everything configured correctly. Has anyone merged the patch discussed in this thread into Org? Thank you. Rudy I've had lots of problems with getting it to work as well and have not solved all of them. At some point something changed, I think, which made my setup not work correctly any longer. You might be interested in the following issue on gitlab: https://gitlab.com/emacs-geiser/guile/-/issues/13 I've not followed up further yet. Best regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl
Re: Move or rename a file in a link
On 10 March 2022 14:58, Juan Manuel Macías wrote: > Hi João, Thanks for your comment. Hello, Juan! I apologize for the delay on responding, I had some issues with my e-mail account lately. > Regarding attachments, do you mean org attachments or email attachments? > Could you give an example of a use case? I mean org attachments. I use org-attach extensively to store documents with notes. So I'd have a heading like so * Documents :PROPERTIES: :DIR: data/docs/ :END: - [[Registration][attachment:registration.pdf]] :: My registration. And say I'd like to rename the file. I would need to rename it inside data/docs and I would also need to edit the link, so I would like to have a way to do it automatically. I just got a computer back so I will be trying to adapt what you did to work with org-attach, but if you figure out a way to do it as well, please, let me know. Regards, -- João Pedro de Amorim Paula IT undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)
Re: Using backticks for the inline code delimeter?
> George Mauer writes: >> is there a straightforward way to extend the org parser to do this? > I don't think so. It seems the emphasis markers are hard-coded > in various places. > > From a quick look at the code, you'd have to customize > `org-emphasis-alist` and redefine `org-set-emph-re` and > `org-do-emphasis-faces`. Maybe that'd be enough. > I did just what you said, and I've inserted what's bellow, somewhere in my `init.org` / `init.el`, before anything `org-mode` related (save for two `hook`): (Note it is an almost exact copy from `org.el`, I've only changed a few characters. And added the `advice-add override`.) #+begin_src emacs-lisp (defun org-set-emph-re-fixed (var val) "Set variable and compute the emphasis regular expression." (set var val) (when (and (boundp 'org-emphasis-alist) (boundp 'org-emphasis-regexp-components) org-emphasis-alist org-emphasis-regexp-components) (pcase-let* ((`(,pre ,post ,border ,body ,nl) org-emphasis-regexp-components) (body (if (<= nl 0) body (format "%s*?\\(?:\n%s*?\\)\\{0,%d\\}" body body nl))) (template (format (concat "\\([%s]\\|^\\)" ;before markers "\\(\\([%%s]\\)\\([^%s]\\|[^%s]%s[^%s]\\)\\3\\)" "\\([%s]\\|$\\)") ;after markers pre border border body border post))) (setq org-emph-re (format template "*/_+")) (setq org-verbatim-re (format template "=~`") (advice-add 'org-set-emph-re :override #'org-set-emph-re-fixed) #+end_src #+begin_src emacs-lisp (defun org-do-emphasis-faces-fixed (limit) "Run through the buffer and emphasize strings." (let ((quick-re (format "\\([%s]\\|^\\)\\([~`=*/_+]\\)" (car org-emphasis-regexp-components (catch :exit (while (re-search-forward quick-re limit t) (let* ((marker (match-string 2)) (verbatim? (member marker '("~" "`" "=" (when (save-excursion (goto-char (match-beginning 0)) (and ;; Do not match table hlines. (not (and (equal marker "+") (org-match-line "[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) ;; Do not match headline stars. Do not consider ;; stars of a headline as closing marker for bold ;; markup either. (not (and (equal marker "*") (save-excursion (forward-char) (skip-chars-backward "*") (looking-at-p org-outline-regexp-bol ;; Match full emphasis markup regexp. (looking-at (if verbatim? org-verbatim-re org-emph-re)) ;; Do not span over paragraph boundaries. (not (string-match-p org-element-paragraph-separate (match-string 2))) ;; Do not span over cells in table rows. (not (and (save-match-data (org-match-line "[ \t]*|")) (string-match-p "|" (match-string 4)) (pcase-let ((`(,_ ,face ,_) (assoc marker org-emphasis-alist)) (m (if org-hide-emphasis-markers 4 2))) (font-lock-prepend-text-property (match-beginning m) (match-end m) 'face face) (when verbatim? (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 2) (match-end 2) '(display t invisible t intangible t))) (add-text-properties (match-beginning 2) (match-end 2) '(font-lock-multiline t org-emphasis t)) (when (and org-hide-emphasis-markers (not (org-at-comment-p))) (add-text-properties (match-end 4) (match-beginning 5) '(invisible t)) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t))) (throw :exit t
Re: Using backticks for the inline code delimeter?
email got truncated the 1st time, hope it's bee better this time. > George Mauer writes: >> is there a straightforward way to extend the org parser to do this? > I don't think so. It seems the emphasis markers are hard-coded > in various places. > > From a quick look at the code, you'd have to customize > `org-emphasis-alist` and redefine `org-set-emph-re` and > `org-do-emphasis-faces`. Maybe that'd be enough. > I did just what you said, and I've inserted what's bellow, somewhere in my `init.org` / `init.el`, before anything `org-mode` related (save for two `hook`): (Note it is an almost exact copy from `org.el`, I've only changed a few characters. And added the `advice-add override`.) #+begin_src emacs-lisp (defun org-set-emph-re-fixed (var val) "Set variable and compute the emphasis regular expression." (set var val) (when (and (boundp 'org-emphasis-alist) (boundp 'org-emphasis-regexp-components) org-emphasis-alist org-emphasis-regexp-components) (pcase-let* ((`(,pre ,post ,border ,body ,nl) org-emphasis-regexp-components) (body (if (<= nl 0) body (format "%s*?\\(?:\n%s*?\\)\\{0,%d\\}" body body nl))) (template (format (concat "\\([%s]\\|^\\)" ;before markers "\\(\\([%%s]\\)\\([^%s]\\|[^%s]%s[^%s]\\)\\3\\)" "\\([%s]\\|$\\)") ;after markers pre border border body border post))) (setq org-emph-re (format template "*/_+")) (setq org-verbatim-re (format template "=~`") (advice-add 'org-set-emph-re :override #'org-set-emph-re-fixed) #+end_src #+begin_src emacs-lisp (defun org-do-emphasis-faces-fixed (limit) "Run through the buffer and emphasize strings." (let ((quick-re (format "\\([%s]\\|^\\)\\([~`=*/_+]\\)" (car org-emphasis-regexp-components (catch :exit (while (re-search-forward quick-re limit t) (let* ((marker (match-string 2)) (verbatim? (member marker '("~" "`" "=" (when (save-excursion (goto-char (match-beginning 0)) (and ;; Do not match table hlines. (not (and (equal marker "+") (org-match-line "[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) ;; Do not match headline stars. Do not consider ;; stars of a headline as closing marker for bold ;; markup either. (not (and (equal marker "*") (save-excursion (forward-char) (skip-chars-backward "*") (looking-at-p org-outline-regexp-bol ;; Match full emphasis markup regexp. (looking-at (if verbatim? org-verbatim-re org-emph-re)) ;; Do not span over paragraph boundaries. (not (string-match-p org-element-paragraph-separate (match-string 2))) ;; Do not span over cells in table rows. (not (and (save-match-data (org-match-line "[ \t]*|")) (string-match-p "|" (match-string 4)) (pcase-let ((`(,_ ,face ,_) (assoc marker org-emphasis-alist)) (m (if org-hide-emphasis-markers 4 2))) (font-lock-prepend-text-property (match-beginning m) (match-end m) 'face face) (when verbatim? (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 2) (match-end 2) '(display t invisible t intangible t))) (add-text-properties (match-beginning 2) (match-end 2) '(font-lock-multiline t org-emphasis t)) (when (and org-hide-emphasis-markers (not (org-at-comment-p))) (add-text-properties (match-end 4) (match-beginning 5) '(invisible t)) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t))) (throw :exit t (advice-add 'org-do-emphasis-faces :override #'org-do-emphasis-faces-fixed) #+end_src #+begin_src emacs-lisp (custom-set-variables '(org-emphasis-alist '(("*" bold) ("/" italic) ("_" underline) ("=" org-verbatim verbatim) ("`" org-code verbatim) ("~" org-code verbatim)
[PATCH] org-todo-yesterday: Fix interactive arg when in agenda buffer
The following changes since commit 668205f7693e028f15240ffc043e037b411daf81: Backport commit d52c929e3 from Emacs (2022-03-02 23:02:50 -0500) are available in the Git repository at: g...@github.com:bcc32/org-mode.git bugfix for you to fetch changes up to 0a073f0b0d7b0eb72f41e2edde4e070ca431ff71: org-todo-yesterday: Fix interactive arg when in agenda buffer (2022-03-18 23:31:37 -0400) Aaron L. Zeng (1): org-todo-yesterday: Fix interactive arg when in agenda buffer lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)