Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cmal authored and cmal committed Sep 1, 2021
1 parent 23b6545 commit 7675de1
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 24 deletions.
3 changes: 1 addition & 2 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ BODY will be ignored."

;; Setup packages
(require 'setup-package)
(require 'setup-org)


;; Setup environment variables from the user's shell.
Expand Down Expand Up @@ -276,8 +277,6 @@ BODY will be ignored."
(require 'setup-helm))

;; (eval-after-load 'ido '(require 'setup-ido))
;; (require 'setup-org)
;; (eval-after-load 'org '(require 'setup-org))
;; (eval-after-load 'dired '(require 'setup-dired))
;; (eval-after-load 'magit '(require 'setup-magit))
;; (eval-after-load 'grep '(require 'setup-rgrep))
Expand Down
28 changes: 28 additions & 0 deletions scripts/get-org.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /bin/sh -x -u -e
#
# Get latest version of org-mode in ~/git/orgmode.org/org-mode
#

WHERE="${HOME}/.emacs.d/site-lisp"
mkdir -p ${WHERE}
cd ${WHERE}

# pull for first time if we don't have it

if [ ! -d ${WHERE}/org ]; then
git clone [email protected]:cmal/org-mode.git org
else
# get updates, if any
cd ${WHERE}/org
git pull
fi

# build the autoloads
cd ${WHERE}/org
make
make autoloads

# Add to .emacs, .emacs.d/init.el, whatever...
#
#(add-to-list 'load-path "~/git/orgmode.org/org-mode/lisp/")
#(add-to-list 'load-path "~/elisp/orgmodeorg/org-mode/contrib/lisp/" t)
43 changes: 22 additions & 21 deletions settings/setup-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

(remove-org-dir-from-load-path)

(add-to-list 'load-path (expand-file-name "org/lisp" site-lisp-dir))
(add-to-list 'load-path (expand-file-name "org/contrib/lisp" site-lisp-dir))
(setq org-source-path (concat site-lisp-dir "/org"))

(add-to-list 'load-path (expand-file-name "lisp" org-source-path))
;(add-to-list 'load-path (expand-file-name "contrib/lisp" org-source-path))
(require 'org-loaddefs)
(require 'org)

(defun myorg-update-parent-cookie ()
Expand Down Expand Up @@ -125,14 +127,14 @@ same directory as the org-buffer and insert a link to this file."
(interactive "*")
(org-display-inline-images)
(let (filename (get-png-filename))
(unless (file-exists-p (file-name-directory filename))
(make-directory (file-name-directory filename))) ; take screenshot
(if (eq system-type 'darwin)
(call-process "screencapture" nil nil nil "-i" filename))
(if (eq system-type 'gnu/linux)
(call-process "import" nil nil nil filename)) ; insert into file if correctly taken
(if (file-exists-p filename)
(insert filename))))
(unless (file-exists-p (file-name-directory filename))
(make-directory (file-name-directory filename))) ; take screenshot
(if (eq system-type 'darwin)
(call-process "screencapture" nil nil nil "-i" filename))
(if (eq system-type 'gnu/linux)
(call-process "import" nil nil nil filename)) ; insert into file if correctly taken
(if (file-exists-p filename)
(insert filename))))

;; pasting images into org-mode on Mac, first,
;; $ brew install pngpaste
Expand Down Expand Up @@ -517,7 +519,7 @@ same directory as the org-buffer and insert a link to this file."
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
;; ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")
)
Expand Down Expand Up @@ -583,14 +585,13 @@ same directory as the org-buffer and insert a link to this file."
(setq org-download-method 'directory)
(add-hook 'org-mode-hook 'org-download-enable)


(setq org-directory (concat (getenv "HOME") "/gits/org/"))

(use-package org-roam
:after org
:init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
:custom
(org-roam-directory (file-truename org-directory))
(org-roam-directory (concat (file-truename org-directory) "roam/"))
:config
(org-roam-setup)
:bind (("C-c n f" . org-roam-node-find)
Expand All @@ -603,13 +604,13 @@ same directory as the org-buffer and insert a link to this file."
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle)))))

(use-package deft
:config
(setq deft-directory org-directory
deft-recursive t
deft-strip-summary-regexp ":PROPERTIES:\n\\(.+\n\\)+:END:\n"
deft-use-filename-as-title t)
:bind
("C-c n d" . deft))
(use-package deft
:config
(setq deft-directory org-roam-directory
deft-recursive t
deft-strip-summary-regexp ":PROPERTIES:\n\\(.+\n\\)+:END:\n"
deft-use-filename-as-title t)
:bind
("C-c n d" . deft))

(provide 'setup-org)
2 changes: 1 addition & 1 deletion site-lisp/org
Submodule org updated from 1b74ae to 366444

0 comments on commit 7675de1

Please sign in to comment.