Re: Feature request
I think something like the following will do (untested): (defun org-attach-save-file-list-to-property () "Save list of attachments to ORG_ATTACH_FILES property." (when-let* ((dir (org-attach-dir)) (files (org-attach-file-list dir))) (org-set-property "ORG_ATTACH_FILES" (mapconcat #'identity files ", " (add-hook 'org-attach-after-change-hook #'org-attach-save-file-list-to-property) Best, Ihor
Re: Feature request
Raoul Comninos writes: >> Listing all the attached files used to be the built-in, but it was >> removed a few years ago. > Oh, that's a pity. Thanks for responding. You can still implement it on your side for personal use. There is org-attach-after-change-hook where you can put a custom function saving the attached file list (org-attach-file-list) into a property. Best, Ihor
Re: Feature request
Ihor Radchenko writes: > Raoul Comninos writes: > >> https://emacs.stackexchange.com/questions/62761/seeing-file-names-in-todo-entries-when-using-org-attach?noredirect=1#comment98901_62761 >> --- > > Listing all the attached files used to be the built-in, but it was > removed a few years ago. > > Best, > Ihor > Oh, that's a pity. Thanks for responding.
Re: Custom Bulk Functions With Prompt
Kevin Foley writes: > I'd like to setup a custom bulk function using > `org-agenda-bulk-custom-functions', however I'd like to receive one > prompt when I select the action and then have the action performed on > every entry without being prompted again. Generally, you can set a variable indicating if your custom function is invoked first time during the bulk action. This variable can be set to nil in :before advice for org-agenda-bulk-action. Then, you can check the variable value in your custom function. If it is nil, it is the first invocation and you run the interactive version then setting the variable to 't. The variable will have 't value in all the following invocations and your function can run non-interactively. Instead of advice, you can also provide a simple patch implementing the described functionality in org-agenda-bulk-action. I do support adding this functionality to org. Best, Ihor
Re: Feature request
Raoul Comninos writes: > https://emacs.stackexchange.com/questions/62761/seeing-file-names-in-todo-entries-when-using-org-attach?noredirect=1#comment98901_62761 > --- Listing all the attached files used to be the built-in, but it was removed a few years ago. Best, Ihor
Re: Feature request
Raoul Comninos writes: > https://emacs.stackexchange.com/questions/62761/seeing-file-names-in-todo-entries-when-using-org-attach?noredirect=1#comment98901_62761 > --- Listing all the attached files used to be the built-in, but it was removed a few years ago. Best, Ihor
Custom Bulk Functions With Prompt
I'd like to setup a custom bulk function using `org-agenda-bulk-custom-functions', however I'd like to receive one prompt when I select the action and then have the action performed on every entry without being prompted again. For example the bulk tag function lets the user specify a tag once, then applies that to every entry. As far as I can tell from looking through the source code, there's no way to replicate this via a custom function. Is there something I'm missing that would allow me to do this? If not, any suggestions on how support for it could be implemented? I'd be happy to submit a patch but I'm not sure of the best way to approach it. Kevin Foley
Re: [PATCH] ob-java, a proposal on import improvement
It's no problem. Didn't mean to rush you. Thanks again for the patch. Applied. On Sat, Jan 16, 2021 at 10:32 AM John Herrlin wrote: > > > Sorry for latency, 9to5 been killing it. Thx for the feedback, make > sense! Here is a new patch with the improvements. > > > > ian martins writes: > > > John, would you mind if I go ahead and make the change I mentioned and > > push it with you as the author? > > > > On Tue, Jan 12, 2021 at 7:00 AM ian martins wrote: > >> > >> On Sun, Jan 10, 2021 at 3:55 PM John Herrlin wrote: > >> > ian martins writes: > >> > > I think the problem was that I was missing static > >> > > imports, which you fixed in the first chunk of your patch. I don't > >> > > think the rest of the change is necessary. Could you revert the other > >> > > chunks and re-test? > >> > > >> > Thats looks correct! Thanks! > >> > > >> > Here is a patch with the regexp fix. > >> > >> That's great. One small change, though. This only allows for a single > >> space between "import" and "static" so if someone were to put in two > >> it wouldn't work. I actually did the same thing in an earlier version > >> and it caused a problem. Since then I went to =(1+ space)= > >> everywhere. Could you also move the part that you're adding down to > >> the next line. It's not that the line is too long, but it keeps it to > >> one thing per line. > >> > >> The commit message is fine, but the first line shouldn't end in a period. > >> > >> ref: https://orgmode.org/worg/org-contribute.html#commit-messages
Re: [PATCH] ob-java, a proposal on import improvement
Sorry for latency, 9to5 been killing it. Thx for the feedback, make sense! Here is a new patch with the improvements. >From 680e04217c8e4c536875379cac01edccd694c4cb Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Sun, 10 Jan 2021 21:47:26 +0100 Subject: [PATCH] ob-java: Include static imports in regex * lisp/ob-java.el (org-babel-java--imports-re): Include static imports in Java import regex. TINYCHANGE --- lisp/ob-java.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index f70a50192..c9698bd72 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -87,6 +87,7 @@ like javac -verbose." (0+ space) ?\; line-end) "Regexp for the package statement.") (defconst org-babel-java--imports-re (rx line-start (0+ space) "import" + (opt (1+ space) "static") (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the fully qualified class name (0+ space) ?\; line-end) "Regexp for import statements.") -- 2.30.0 ian martins writes: > John, would you mind if I go ahead and make the change I mentioned and > push it with you as the author? > > On Tue, Jan 12, 2021 at 7:00 AM ian martins wrote: >> >> On Sun, Jan 10, 2021 at 3:55 PM John Herrlin wrote: >> > ian martins writes: >> > > I think the problem was that I was missing static >> > > imports, which you fixed in the first chunk of your patch. I don't >> > > think the rest of the change is necessary. Could you revert the other >> > > chunks and re-test? >> > >> > Thats looks correct! Thanks! >> > >> > Here is a patch with the regexp fix. >> >> That's great. One small change, though. This only allows for a single >> space between "import" and "static" so if someone were to put in two >> it wouldn't work. I actually did the same thing in an earlier version >> and it caused a problem. Since then I went to =(1+ space)= >> everywhere. Could you also move the part that you're adding down to >> the next line. It's not that the line is too long, but it keeps it to >> one thing per line. >> >> The commit message is fine, but the first line shouldn't end in a period. >> >> ref: https://orgmode.org/worg/org-contribute.html#commit-messages
bug#45091: 27.1; M-x org-table-paste-rectangle
Naoya showed me workaround. #+begin_src emacs-lisp (when (equal emacs-major-version 27) (with-eval-after-load "org-compat" (defalias 'org-font-lock-ensure 'ignore))) #+end_src Now I switched from 26.3 to 27.1.
Re: na=\"nil\" in ob-R.elo
Hello, Thanks for the feedback || On Saturday, 16 Jan 2021 at 00:19, Berry, Charles" via "General discussions about Org-mode. wrote: > You can use a :post header to customize outputs like this to make them > more pleasing. Or just use your own > `org-babel-R-write-object-command'. As a quick work around you can use #+name: remove-nil #+begin_src emacs-lisp :var tbl="" (mapcar (lambda (row) (mapcar (lambda (cell) (if (equal "nil" cell) "" cell)) row)) tbl) #+end_src #+BEGIN_SRC R :results value :colnames yes :post remove-nil[:colnames yes](*this*) data.frame(A=c(NA,1,1,1,1),B=c(1,2,NA,4,4)) #+end_src #+RESULTS: | A | B | |---+---| | | 1 | | 1 | 2 | | 1 | | | 1 | 4 | | 1 | 4 | >> Probably a silly question, but in ob-R.el, what is the reason for >> setting na=\"nil\" when defining org-babel-R-write-object-command? Is >> this an elisp compatibility thing? >> > > I don't get it either. The value corresponding to the NA becomes a string in > emacs-lisp whether \"nil\" or \"\" is used. > So when passed to elisp via a :post header referencing an emacs-lisp > src block, its treated as a string. Thanks Chuck for pointing this out. R users are used to handle NA but in this particular case where empty string and NA are treated the same, I'm not sure the nil feature is very useful. If it does not break anything else I will consider removing it. Best regards, -- Jeremie Juste
Re: Emacs-orgmode Digest, Vol 179, Issue 18
LlmllmllkmkLlLKmKLKKM Odesláno ze smartphonu BlackBerry – nejzabezpečenějšího mobilního zařízení Původní zpráva Od: emacs-orgmode-requ...@gnu.org Odesláno: 15. ledna 2021 18:05 Komu: emacs-orgmode@gnu.org Odpověď komu: emacs-orgmode@gnu.org Předmět: Emacs-orgmode Digest, Vol 179, Issue 18 Send Emacs-orgmode mailing list submissions to emacs-orgmode@gnu.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/emacs-orgmode or, via email, send a message with subject or body 'help' to emacs-orgmode-requ...@gnu.org You can reach the person managing the list at emacs-orgmode-ow...@gnu.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Emacs-orgmode digest..." Today's Topics: 1. bug#42484: 26.1: org-mode should display value of links in mini-buffer (Samuel Wales) 2. na=\"nil\" in ob-R.elo (Brett Presnell) 3. bug#45091: 27.1; M-x org-table-paste-rectangle (Naoya Yamashita) 4. bug#45091: 27.1; M-x org-table-paste-rectangle (João Távora) 5. Re: How to use `open` to handle `message:*` links on macOS (Alexander Adolf) -- Message: 1 Date: Thu, 14 Jan 2021 14:02:24 -0700 From: Samuel Wales To: Juri Linkov Cc: Boruch Baum , 42...@debbugs.gnu.org Subject: bug#42484: 26.1: org-mode should display value of links in mini-buffer Message-ID: Content-Type: text/plain; charset="UTF-8" by activate i mean display, in echo area, whatever it is i want to display. i think help-echo is a text property, and i might or might not want to display it, depending. and i might want to display the other stuff even if there is no help-echo. i use [and adore] org-link-minor mode in elisp mode. it highlights links and timestamps and makes links followable. i even use [[target]] <> within elisp buffers, and org id links that go from elisp to org and vice-versa. if org-link-minor-mode is active in an elisp buffer, i can run the following to detect whether cursor is over an org ts. (defun hoka-eldoc-at-point () (when (eq 'org-date (get-text-property (point) 'face)) (format "%s" (when (fboundp 'alpha-org-time-span) (with-no-warnings (alpha-org-time-span)) then i get the time span in the echo area. a time span is e.g. -1 for yesterday. it could just as well be a timestamp in a different format or lang. so that's great. but i want mouse hover to do the same thing, and to do so with a delay. and i want links of course. more generally, i might occasionally want /some/ eldoc type stuff and /some/ help-echo stuff. so org-link-minor-mode was useful in my case because it [i think it is it] adds face property which can be used. and i thought that might be useful to you. idk though. in my case i find it a bit overwhelming to get whatever solution i use for cursor to also work for mouse [with appropriate delays]. and get whatever else to work and to not have anything annoyingly display. On 1/14/21, Juri Linkov wrote: >> this is an interesting discussion. is there any side discussion that >> takes into account both mouse and cursor? > > Indeed, you can see a side discussion at > https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00885.html > where we discussed highlighting the completion candidate > the same way whether the mouse pointer hovered over it, > or the cursor moved to its buffer position. > > That discussion also mentions another way to display > help-text using cursor-sensor-mode, i.e. after enabling it, > cursor-sensor-functions can detect when the cursor enters > the help-text property, then display it in the echo area. > >> 1] displaying value of link in echo area [the problem you are >> discussing -- don't let me derail it] with a short nonzero delay >> 2] doing so *for both cursor and mouse* -- too much futzing here >> 3] also doing other stuff -- also futzing >> >> other stuff includes maybe [or maybe not] showing function signature >> or docstrings in elisp buffers [possibly with longer delay], and >> showing the time span in number of days from now to the org timestamp >> at point or under mouse in any mode. > > This looks like the 5th possible way to implement this using eldoc, > in addition to tooltips, post-command-hook, help-at-pt, cursor-sensor-mode. > >> i have code for the last thing. the problem is figuring out making >> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse >> and keyboard without verbose help-echo like in dired. also the >> major/minor modes and > > help-at-pt has an option to ignore verbose help-echo in dired. > post-command-hook can be enabled locally only in org-mode buffers. > I don't know how to do the same in eldoc. > >> i guess i am saying [back to topic] this is a bit complex and i wonder >> if a more orthogonal solution is called for? as some might want mouse >> activation also, and eldoc alrea
Re: [PATCH] ob-java, a proposal on import improvement
John, would you mind if I go ahead and make the change I mentioned and push it with you as the author? On Tue, Jan 12, 2021 at 7:00 AM ian martins wrote: > > On Sun, Jan 10, 2021 at 3:55 PM John Herrlin wrote: > > ian martins writes: > > > I think the problem was that I was missing static > > > imports, which you fixed in the first chunk of your patch. I don't > > > think the rest of the change is necessary. Could you revert the other > > > chunks and re-test? > > > > Thats looks correct! Thanks! > > > > Here is a patch with the regexp fix. > > That's great. One small change, though. This only allows for a single space > between "import" and "static" so if someone were to put in two it wouldn't > work. I actually did the same thing in an earlier version and it caused a > problem. Since then I went to =(1+ space)= everywhere. Could you also move > the part that you're adding down to the next line. It's not that the line is > too long, but it keeps it to one thing per line. > > The commit message is fine, but the first line shouldn't end in a period. > > ref: https://orgmode.org/worg/org-contribute.html#commit-messages