Merge branch 'bugfix' into emacs-sync

This commit is contained in:
Kyle Meyer 2021-12-18 13:43:47 -05:00
commit 255d5cfcb7
4 changed files with 17 additions and 12 deletions

View File

@ -179,15 +179,14 @@ source code blocks by languages matching a regular expression.
Return a list whose CAR is the tangled file name."
(interactive "fFile to tangle: \nP")
(let ((visited-p (find-buffer-visiting (expand-file-name file)))
to-be-removed)
(let* ((visited (find-buffer-visiting file))
(buffer (or visited (find-file-noselect file))))
(prog1
(save-window-excursion
(find-file file)
(setq to-be-removed (current-buffer))
(mapcar #'expand-file-name (org-babel-tangle nil target-file lang-re)))
(unless visited-p
(kill-buffer to-be-removed)))))
(with-current-buffer buffer
(org-with-wide-buffer
(mapcar #'expand-file-name
(org-babel-tangle nil target-file lang-re))))
(unless visited (kill-buffer buffer)))))
(defun org-babel-tangle-publish (_ filename pub-dir)
"Tangle FILENAME and place the results in PUB-DIR."

View File

@ -6765,7 +6765,7 @@ Any match of REMOVE-RE will be removed from TXT."
(setq duration (- (org-duration-to-minutes s2)
(org-duration-to-minutes s1))))
;; Format S1 and S2 for display.
(when s1 (setq s1 (org-get-time-of-day s1 'overtime)))
(when s1 (setq s1 (format "%5s" (org-get-time-of-day s1 'overtime))))
(when s2 (setq s2 (org-get-time-of-day s2 'overtime))))
(when (string-match org-tag-group-re txt)
;; Tags are in the string

View File

@ -428,7 +428,8 @@ current time."
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
(while (not (eobp))
(let ((habit (get-text-property (point) 'org-habit-p)))
(let ((habit (get-text-property (point) 'org-habit-p))
(invisible-prop (get-text-property (point) 'invisible)))
(when habit
(move-to-column org-habit-graph-column t)
(delete-char (min (+ 1 org-habit-preceding-days
@ -439,7 +440,12 @@ current time."
habit
(time-subtract moment (days-to-time org-habit-preceding-days))
moment
(time-add moment (days-to-time org-habit-following-days))))))
(time-add moment (days-to-time org-habit-following-days))))
;; Inherit invisible state of hidden entries.
(when invisible-prop
(put-text-property
(- (point) org-habit-graph-column) (point)
'invisible invisible-prop))))
(forward-line)))))
(defun org-habit-toggle-habits ()

View File

@ -6905,7 +6905,7 @@ frame is not changed."
(setq beg (point)
heading (org-get-heading 'no-tags))
(org-end-of-subtree t t)
(when (org-at-heading-p) (backward-char 1))
(when (and (not (eobp)) (org-at-heading-p)) (backward-char 1))
(setq end (point)))
(when (and (buffer-live-p org-last-indirect-buffer)
(not (eq org-indirect-buffer-display 'new-frame))