emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bring up a screen giving option to open a series of orgmode files


From: Jean Louis
Subject: Re: Bring up a screen giving option to open a series of orgmode files
Date: Sun, 22 Nov 2020 22:15:44 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Gerardo Moro <gerardomoro37@gmail.com> [2020-11-22 22:04]:
> Thanks to both of you,
> 
> find Documents/Org/ -type f -iname "*.org" -exec echo " * [[file:`realpath
> {}`][{}]]" > meta-org.org \;
> 
> Instead of "Documents/Org/" you should put there your own top
> directory where you keep Org files.
> 
> Then open meta-org.org
> 
> 
> I am confused. I don't understand the syntax. The line "find Documents/Org/
> -type f -iname "*.org" -exec echo " * [[file:`realpath {}`][{}]]" >
> meta-org.org \;" should be a function of its own?

That was shell command. Like in bash, dash, zsh and similar.

> M-x find-dired RET Documents/Org/ RET -iname "*.org" RET
> 
> Once I press "RET", what does -iname mean? I am new in Emacs. You mean,
> this is just using find-dired to browse the org files?

For Emacs function it is like this one here:

;; setup here your main subtree
(setq my-org-dir "~/Documents/Org")

(defun my-meta-org ()
  "Opens my meta-org.org on the fly with hyperlinks to other Org files."
  (interactive)
  (let ((org-files (directory-files my-org-dir t ".org"))
        (meta-buffer "meta-org.org"))
    (with-temp-buffer-window meta-buffer nil nil
      (switch-to-buffer meta-buffer)
      (org-mode)
      (dolist (file org-files)
        (insert (format "- [[%s][%s]]\n" file (file-name-base file)))))))

then run:

M-x my-meta-org




reply via email to

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