Re: Format of Effort estimates should be mentioned in its Info node
> On Jan 4, 2020, at 14:20, Kisaragi Hiu wrote: > > It didn't work for me because I gave it "10m" which actually means 10 months, > I've realized. > > Still, Durations as defined by org-duration.el should be described in the > manual like how Timestamps are. This does look like a potential contribution to the package. Jean-Christophe Helary > > 2020年1月4日 11:55 差出し人: k...@kyleam.com: > >> Kisaragi Hiu writes: >> >>> Currently, the Info node about effort estimates does not mention what >>> format should it be written in. This causes confusion, as a user might >>> assume that it's the same format as schedulers (10m, 6h, etc.) like I >>> did. >>> >>> Simply mentioning "Effort estimates need to have the format H:MM" >>> >> >> I don't personally use effort estimates, but quickly poking around I see >> some indication that estimates should work fine with things like 10min >> rather than 0:10. In particular org-set-effort has a bit that looks >> like this: >> >> (org-refresh-property '((effort . identity) >> (effort-minutes . org-duration-to-minutes)) >> value) >> >> The presence of org-duration-to-minutes hints to some sort of >> normalization: >> >> (org-duration-to-minutes "10min") ; => 10.0 >> (org-duration-to-minutes "0:10") ; => 10.0 >> >> And it looks like org-agenda-compare-effort uses the effort-minutes text >> property. That's presumably why, when I view the entries below in the >> agenda, org-agenda-filter-by-effort (bound to "_") treats them the same: >> >> * TODO a >> :PROPERTIES: >> :Effort: 10min >> :END: >> >> * TODO b >> :PROPERTIES: >> :Effort: 0:10 >> :END: >> >> But that's just one use of effort values, and it sounds like you've hit >> into cases where the 10min form didn't work as expected. Could you >> provide more details? >> >>> (copied from the docstring or org-effort-property, the only* >>> description of the format I could find) in the Info node would be >>> enough. >>> >> >> Given the above, it seems like org-effort-property's docstring is at >> least somewhat inaccurate. >> > > Jean-Christophe Helary --- http://mac4translators.blogspot.com @brandelune
Re: Format of Effort estimates should be mentioned in its Info node
It didn't work for me because I gave it "10m" which actually means 10 months, I've realized. Still, Durations as defined by org-duration.el should be described in the manual like how Timestamps are. 2020年1月4日 11:55 差出し人: k...@kyleam.com: > Kisaragi Hiu writes: > >> Currently, the Info node about effort estimates does not mention what >> format should it be written in. This causes confusion, as a user might >> assume that it's the same format as schedulers (10m, 6h, etc.) like I >> did. >> >> Simply mentioning "Effort estimates need to have the format H:MM" >> > > I don't personally use effort estimates, but quickly poking around I see > some indication that estimates should work fine with things like 10min > rather than 0:10. In particular org-set-effort has a bit that looks > like this: > > (org-refresh-property '((effort . identity) > (effort-minutes . org-duration-to-minutes)) > value) > > The presence of org-duration-to-minutes hints to some sort of > normalization: > > (org-duration-to-minutes "10min") ; => 10.0 > (org-duration-to-minutes "0:10") ; => 10.0 > > And it looks like org-agenda-compare-effort uses the effort-minutes text > property. That's presumably why, when I view the entries below in the > agenda, org-agenda-filter-by-effort (bound to "_") treats them the same: > > * TODO a > :PROPERTIES: > :Effort: 10min > :END: > > * TODO b > :PROPERTIES: > :Effort: 0:10 > :END: > > But that's just one use of effort values, and it sounds like you've hit > into cases where the 10min form didn't work as expected. Could you > provide more details? > >> (copied from the docstring or org-effort-property, the only* >> description of the format I could find) in the Info node would be >> enough. >> > > Given the above, it seems like org-effort-property's docstring is at > least somewhat inaccurate. >
Re: Format of Effort estimates should be mentioned in its Info node
Kisaragi Hiu writes: > Currently, the Info node about effort estimates does not mention what > format should it be written in. This causes confusion, as a user might > assume that it's the same format as schedulers (10m, 6h, etc.) like I > did. > > Simply mentioning "Effort estimates need to have the format H:MM" I don't personally use effort estimates, but quickly poking around I see some indication that estimates should work fine with things like 10min rather than 0:10. In particular org-set-effort has a bit that looks like this: (org-refresh-property '((effort . identity) (effort-minutes . org-duration-to-minutes)) value) The presence of org-duration-to-minutes hints to some sort of normalization: (org-duration-to-minutes "10min") ; => 10.0 (org-duration-to-minutes "0:10") ; => 10.0 And it looks like org-agenda-compare-effort uses the effort-minutes text property. That's presumably why, when I view the entries below in the agenda, org-agenda-filter-by-effort (bound to "_") treats them the same: * TODO a :PROPERTIES: :Effort: 10min :END: * TODO b :PROPERTIES: :Effort: 0:10 :END: But that's just one use of effort values, and it sounds like you've hit into cases where the 10min form didn't work as expected. Could you provide more details? > (copied from the docstring or org-effort-property, the only* > description of the format I could find) in the Info node would be > enough. Given the above, it seems like org-effort-property's docstring is at least somewhat inaccurate.
Re: Add a new link type for video files
Hi Stardiviner, just some quick comments on org-video-link-open... Eev also has functions for opening audio/video files at certain time offsets. They are called like this (with `C-e C-x C-e' or something equivalent), (find-video "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4") (find-video "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "1:17") and the sexps above pass these lists to start-process: ("mpv" "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "--fs" "--osd-level=2") ("mpv" "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4" "--start" "1:17" "--fs" "--osd-level=2") I use mpv instead of mplayer because this page at the Wikipedia convinced me to: https://en.wikipedia.org/wiki/Mpv_(media_player) "--fs" means "full screen" and "--osd-level=2" shows the current time. If you know other emacs packages that implement opening audio or video files and skipping to a certain position please tell me - I would like to mention them in the comments of eev-audiovideo.el. I mentioned your previous message there, by the way! See: https://github.com/edrx/eev/blob/UTF-8/eev-audiovideo.el#L55 http://angg.twu.net/eev-current/eev-audiovideo.el.html http://angg.twu.net/eev-current/eev-audiovideo.el Cheers, Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/emacsconf2019.html On Fri, 3 Jan 2020 at 06:15, stardiviner wrote: > > > I write a patch to add new link type: > > #+begin_example > [[video:/path/to/file.mp4::00:13:20]] > #+end_example > > This will open video file in specific timestamp. And it is possible to add > more > options in link. Like video player arguments. > > I want to ask should I add this patch to Org Mode built-in? > > Here is my patch source code: > > #+begin_src emacs-lisp :file "ol-video.el" > ;;; [[video:/path/to/file.mp4::00:13:20]] > (defcustom org-video-link-open-command "mplayer" > "Specify the program for openning video: link." > :type 'string) > > (defvar org-video-link-extension-list '("avi" "rmvb" "ogg" "mp4" "mkv")) > > (defun org-video-link-open (uri) > "Open video file `URI' with video player." > (let* ((list (split-string uri "::")) > (path (car list)) > (start-timstamp (cadr list))) > (make-process > :command (list org-video-link-open-command > "-ss" start-timstamp > (expand-file-name (org-link-unescape path))) > :name "org-video-link"))) > > (defun org-video-complete-link ( arg) > "Create a video link using completion." > (let ((file (read-file-name "Video: " nil nil nil nil > #'(lambda (file) > (seq-contains-p >org-video-link-extension-list >(file-name-extension file) > (pwd (file-name-as-directory (expand-file-name "."))) > (pwd1 (file-name-as-directory (abbreviate-file-name >(expand-file-name ".") > (cond ((equal arg '(16)) >(concat "video:" >(abbreviate-file-name (expand-file-name file > ((string-match > (concat "^" (regexp-quote pwd1) "\\(.+\\)") file) >(concat "video:" (match-string 1 file))) > ((string-match > (concat "^" (regexp-quote pwd) "\\(.+\\)") > (expand-file-name file)) >(concat "video:" >(match-string 1 (expand-file-name file > (t (concat "video:" file) > > (org-link-set-parameters "video" > :follow #'org-video-link-open > :complete #'org-video-complete-link) > #+end_src > > -- > [ stardiviner ] >I try to make every word tell the meaning what I want to express. > >Blog: https://stardiviner.github.io/ >IRC(freenode): stardiviner, Matrix: stardiviner >GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > >
specify time of day for org-resolve-clocks, not number of minutes
Hello, I posted a question on emacs.stackexchange: https://emacs.stackexchange.com/questions/54445/specify-time-of-day-for-org-resolve-clocks-not-number-of-minutes ...about using a time of day when using org-resolve clocks, but didn't get an answer. Here's my question; perhaps this more targeted group can help: I can use org-resolve-clocks if I've been away from a task but kept the clock for the task running -- but when I do that and select K ("keeps however many minutes you request and then immediately clock out of that task."), I have to specify a number of *minutes*. Instead, I want to specify a *time*, since usually that's what I remember ("my coworker stopped to ask a question at 10:45"). I'd like a way to get the K functionality, but instead of doing the math to figure out a number of minutes, I want to just type in a time of day. Is there a way to do this already? Or would this require a new clock resolution command -- perhaps "t", for "time": it would effectively just be a wrapper around "k" that parses the provided time, looks at the current clocked-in task, computes the appropriate number of minutes, and then just does whatever "k" (or "K") does. Thanks! -- Ceci n'est pas une .signature.
Issue with internal directory links
Issue: When calling `org-open-at-point' with the cursor on an internal link to a directory, the directory is not opened in a new dired buffer and the following message is printed in the minibuffer: "Running less path/to/directory...done" Expected behavior: A dired buffer is opened using the directory in the link. The following org bug report was generated when replicating the expected behavior: Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2019-02-08 Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.1/lisp/org/) current state: == (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-confirm-shell-link-function 'yes-or-no-p org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat "http:" path ("https" :follow (lambda (path) (browse-url (concat "https:" path ("mailto" :follow (lambda (path) (browse-url (concat "mailto:; path ("news" :follow (lambda (path) (browse-url (concat "news:; path ("shell" :follow org--open-shell-link)) ) The following org bug report was generated when replicating the issue: Emacs : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-12-14 Package: Org mode version 9.3 (release_9.3 @ /home//emacs/lisp/org/) current state: == (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
Add a new link type for video files
I write a patch to add new link type: #+begin_example [[video:/path/to/file.mp4::00:13:20]] #+end_example This will open video file in specific timestamp. And it is possible to add more options in link. Like video player arguments. I want to ask should I add this patch to Org Mode built-in? Here is my patch source code: #+begin_src emacs-lisp :file "ol-video.el" ;;; [[video:/path/to/file.mp4::00:13:20]] (defcustom org-video-link-open-command "mplayer" "Specify the program for openning video: link." :type 'string) (defvar org-video-link-extension-list '("avi" "rmvb" "ogg" "mp4" "mkv")) (defun org-video-link-open (uri) "Open video file `URI' with video player." (let* ((list (split-string uri "::")) (path (car list)) (start-timstamp (cadr list))) (make-process :command (list org-video-link-open-command "-ss" start-timstamp (expand-file-name (org-link-unescape path))) :name "org-video-link"))) (defun org-video-complete-link ( arg) "Create a video link using completion." (let ((file (read-file-name "Video: " nil nil nil nil #'(lambda (file) (seq-contains-p org-video-link-extension-list (file-name-extension file) (pwd (file-name-as-directory (expand-file-name "."))) (pwd1 (file-name-as-directory (abbreviate-file-name (expand-file-name ".") (cond ((equal arg '(16)) (concat "video:" (abbreviate-file-name (expand-file-name file ((string-match (concat "^" (regexp-quote pwd1) "\\(.+\\)") file) (concat "video:" (match-string 1 file))) ((string-match (concat "^" (regexp-quote pwd) "\\(.+\\)") (expand-file-name file)) (concat "video:" (match-string 1 (expand-file-name file (t (concat "video:" file) (org-link-set-parameters "video" :follow #'org-video-link-open :complete #'org-video-complete-link) #+end_src -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3