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: Gerardo Moro
Subject: Re: Bring up a screen giving option to open a series of orgmode files
Date: Mon, 23 Nov 2020 05:59:34 +0200

Thanks so much, now it works when using that elisp function.
One thing yet:
> 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.

You mean a shell command to be executed in M-x shell-command? I did so, but the output was 

<*.org" -exec echo " * [[file:`realpath {}`][{}]]" > meta-org.org \
Thanks,
GM

El dom, 22 nov 2020 a las 21:16, Jean Louis (<bugs@gnu.support>) escribió:
* 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]