Re: Babel: Programmatically evaluate a heading and subtrees?
On Sat, Feb 27, 2021 at 7:18 AM ian martins wrote: > Can you use noweb? In the example below, if you run the top code block > babel will run the two that follow. > Hi Ian, yes, I can run the top code block *manually* by navigating to that block and then evaluating it. I would like to define a keyboard shortcut that will call the function and its subheadings' functions. > > A drawback is that you have to redefine variables, but it might be a > benefit, since the individual blocks could be set with test data and > the "main driver" could point to real data. > --- > > #+begin_src elisp :results output :noweb yes :var data=data1 > <> > <> > #+end_src > > #+RESULTS: > : called fun1: some data > : called fun2 > > #+name: data1 > some data > > #+name: fun1 > #+begin_src elisp :var data=data1 > (princ (format "called fun1: %s" data)) > #+end_src > > #+name: fun2 > #+begin_src elisp > (princ "called fun2") > #+end_src > I don't see an example of calling these blocks programmatically. I will research the docs a bit more. Thanks! > On Sat, Feb 20, 2021 at 2:11 PM Nathan Neff wrote: > > > > Hello all, > > > > I have some code like this: > > > > * Heading 1 > > > > # code block name:FOO > > > > ** Subheading 1 > > > > # code block > > > > ** Subheading 2 > > > > # code block > > > > I find that I often want to evaluate the code in Heading 1 and its > subheadings. > > > > Currently, I navigate to Heading 1 and then use org-babel-execute-subtree > > > > I see that there's a function called org-babel-goto-named-src-block, so > I think > > I could write a small function to jump to FOO in Heading 1 and then run > execute subtree > > and then jump back to my previous location in Emacs. > > > > Is there a more programmatic or built-in way? For example: > > org-babel-execute-block-and-subheadings FOO > > > > Thanks, > > --Nate >
Re: org-refile-target-verify-function - use inherited tag & todo
Thank you Gustavo, I got this to work after revisiting! I changed my org-agenda-files to a single variable "org-agenda-files.org" , and populated the file with my agenda files. I modified the wrapper script to call the (org-agenda-files) function. This is so nice - I have a lot of org-mode files and the ability to remove files "root" heading is really nice when filtering by tag. #+begin_src emacs-lisp (defun njn-org-refile-filter-targets (orig-fun &rest args) (let ((targets (apply orig-fun args)) (agenda-files (mapcar #'file-name-nondirectory (org-agenda-files (cl-remove-if (lambda (x) (member (car x) agenda-files)) targets))) #+end_src On Sat, Nov 2, 2019 at 8:06 AM Gustavo Barros wrote: > Hi Nate, > > On Fri, Nov 01 2019, Nathan Neff wrote: > > > Indeed, I do use org-refile-use-outline-path 'file. However, I have a > > simple > > directory specified for my org-agenda-files. ("~/org-mode") > > Therefore > > I'll need to > > do something a bit different. > > > > It appears that your solution creates "targets" which is the targets > > list > > of course, and > > then it creates "agenda-files" which goes through org-agenda-files and > > finds all the filenames > > in org-agenda files. > > > > It then mutates "targets", and removes any entry which is a filename > > from > > org-agenda-files. > > > > Since my org-agenda-files is simply ("~/org-mode/") none of the > > entries > > match. > > > > Hmmm, let me ask: Why not simply go through targets and remove any > > entry > > whose value is > > a simple filename? Why search org-agenda-files first? This function > > also > > assumes that the org-refile-targets > > always comes from org-agenda-files. > > > > I'll play with your function and see what I can get -- thank you for > > the > > head-start! > > > > Thanks > > --Nate > > I'm glad this might be useful to you. And you are correct in all of > observations. > > My main point is simply that, as things stand, you won't be able to trim > the file level candidates with `org-refile-target-verify-function`, as > they are hardcoded. But this simple function is the sketch of a > (hackish) way. > > `org-refile-get-targets`' main purpose is to return the list of > targets. The advice function grabs this return value, filters the list > and returns the filtered list. How it filters may depend, as you noted. > I've chosen a simple criterion which meets my use case > (`org-agenda-files`, as I specify the individual files directly there, > and use only those as refile targets). Indeed, it does make some > presumptions, as you noted. (The function does not "search > org-agenda-files" though, it just gets the list of their names, which is > contained in the variable). In your case, you will certainly have to > devise another filtering criterion. I think the one you suggest is a > good one too. > > Best regards, > Gustavo. >
Babel: Programmatically evaluate a heading and subtrees?
Hello all, I have some code like this: * Heading 1 # code block name:FOO ** Subheading 1 # code block ** Subheading 2 # code block I find that I often want to evaluate the code in Heading 1 and its subheadings. Currently, I navigate to Heading 1 and then use org-babel-execute-subtree I see that there's a function called org-babel-goto-named-src-block, so I think I could write a small function to jump to FOO in Heading 1 and then run execute subtree and then jump back to my previous location in Emacs. Is there a more programmatic or built-in way? For example: org-babel-execute-block-and-subheadings FOO Thanks, --Nate
Clock report: Handy way to "Advance" report by 1 week
Hello all, I was writing this e-mail to ask this question and I got one of those "Org Mode Rules!" moments and thought I'd share: I have this clockreport which works great * Week of [2020-09-28 Mon] #+BEGIN: clocktable :scope agenda :maxlevel 2 :tstart "[2020-09-28 Mon]" :tend "[2020-10-04 Sun]" :fileskip0 t :link t :step day I simply clone the heading each week using org-clone-subtree-with-time-shift and it works awesome Example: I clone the original and select +1w and org-mode gives me: This Week [2020-10-05 Mon] #+BEGIN: clocktable :scope agenda :maxlevel 2 :tstart "[2020-10-05 Mon]" :tend "[2020-10-11 Sun]" :fileskip0 t :link t :step day #+END: That is so cool!
Re: Custom block agendas: Set buffer name
I found it in this section of the docs: https://orgmode.org/manual/Setting-options.html#Setting-options I had unbalanced parenthesis in Feb. and gave up. I was finally able to find the right place to put the options for all the commands (see org-agenda-buffer-name) below. I create variables and used functions to modularize my code - otherwise the parenthesis become unbearable IMHO. (setq org-agenda-custom-commands '()) (defun njn-define-block-agenda() (setq njn-agenda '(("h" "Agenda and Projects (Home)" ((agenda ) (tags "-projectA-projectB-projectC/next\|started" ((org-agenda-todo-ignore-with-date nil))) (tags "projectA-inactive/-cancelled-done" ((org-agenda-prefix-format " %?-12t% s") (org-agenda-sorting-strategy (quote (priority-down) (tags "projectA-inactive/-cancelled-done" ((org-agenda-prefix-format " %-16(njn-get-proj-property) %?-12t% s") (org-tags-exclude-from-inheritance (remove "projectA" org-tags-exclude-from-inheritance)) (org-agenda-group-by-property "PROJ" ((org-agenda-buffer-name "Home") (setq org-agenda-custom-commands (append njn-agenda org-agenda-custom-commands))) (njn-define-block-agenda) I realize this is opening a can of worms -- does anyone have recommendations for formatting Lisp code? The above code is legible for me *right now* but in about 3 months the code will once again be a paren-fest. Thanks, --Nate On Wed, Feb 12, 2020 at 5:49 PM Nathan Neff wrote: > Hello all, > > I'm playing with block agendas and I'm wondering how to set a > specific buffer > name. > > In non-block agendas, I can set the buffer name like this: > (setq org-agenda-custom-commands (append > '( > ("p" "Simple list of active projects" tags-todo > "PRIORITY<\"C\"+project-inactive/-cancelled-done" >((org-agenda-prefix-format " %?-12t% s") > (org-agenda-buffer-name "Top Level Active Projects") > (org-agenda-sorting-strategy (quote (priority-down) > > But I can't find where to specify org-agenda-buffer-name in a custom block > agenda - for example, > in the docs: > https://orgmode.org/manual/Block-agenda.html > > Where would I add the org-agenda-buffer-name? > > Thanks, > --Nate >
Re: Using regular expressions in custom agenda views
On Sun, Jun 28, 2020 at 5:48 PM Nathan Neff wrote: > More wonkiness: > > This custom view (no regexes) doesn't work, but manually entering projectA > (no quotes) in a tags-todo search > *does* work - so maybe my problem isn't regexes, but something else with > my org-agenda-custom-commands . . . . > > (setq org-agenda-custom-commands > '(("1" tags-todo "projectA"))) > > Okay - calm down - it was the fact that I was using the "tags" search to manually search and my custom view was using tags-todo. Regexes are working now - sorry for the spam! --Nate > > > On Sun, Jun 28, 2020 at 5:39 PM Nathan Neff wrote: > >> Still isn't working with org-mode 9.3.7 (org-20200622) and >> using emacs -q >> >> I have this file: >> >> * One >> :project:a:work:boss:projectA: >> :PROPERTIES: >> :Effort: 1:00 >> :END: >> * Two >> :projectB: >> :PROPERTIES: >> :Effort: 2:00 >> :END: >> >> * Bar >> :pt:project:b: >> >> >> And this custom view returns nothing: >> (setq org-agenda-custom-commands >> '(("1" tags-todo "{projectA}"))) >> >> If I do a tags-todo search manually and use this syntax: {projectA} >> it works. >> >> Ideas? >> >> On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff >> wrote: >> >>> G I tried "package update" and package mgr in Emacs kept telling me >>> that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 >>> - I'll try that first >>> after I figure out how to get that "package" or whatever that thing is >>> to actually show the latest >>> versions of packages. >>> >>> On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff >>> wrote: >>> >>>> >>>> >>>> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer wrote: >>>> >>>>> Nathan Neff writes: >>>>> >>>>> > I'm having a difficult time using regular expressions in custom >>>>> > "tags-todo" agenda views. >>>>> > >>>>> > Is it possible to create custom agenda views using regular >>>>> expressions, >>>>> > and if so, do I need to escape certain characters? >>>>> > >>>>> > I can't get a simple regex like this to work, so I'm suspecting that >>>>> > I'm doing something wrong or, it's simply not possible to create >>>>> custom >>>>> > agenda views that use regular expressions to search for tags. >>>>> > >>>>> > For example, this expression doesn't even find headings with >>>>> :projectA: >>>>> > as a tag >>>>> > >>>>> > (setq org-agenda-custom-commands >>>>> > '( >>>>> > ("1" tags-todo "{projectA}"))) >>>>> >>>>> My understanding is that the above should work. I tried your >>>>> org-agenda-custom-commands value with this agenda file: >>>>> >>>>> * TODO a >>>>> :projectA: >>>>> * TODO b >>>>> :projectB: >>>>> * TODO c >>>>> :project: >>>>> >>>>> With an otherwise vanilla configuration and master (0c1740c91) checked >>>>> out, I see >>>>> >>>>> Headlines with TAGS match: {projectA} >>>>> Press ‘C-u r’ to search again >>>>> scratch:TODO a >>>>> :projectA: >>>>> >>>>> I see the same thing on maint (3ed035ce3). >>>>> >>>> >>>> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using >>>> emacs -q >>>> >>>> I had some other issues w/regexes and Bastien fixed them in "maint": >>>> >>>> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef >>>> >>>> Is it relatively easy to try org-mode's "maint" version (e.g. just >>>> check out branch from >>>> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint" >>>> version to see what's up. >>>> >>>> Thanks, >>>> --Nate >>>> >>>> >>>
Re: Using regular expressions in custom agenda views
More wonkiness: This custom view (no regexes) doesn't work, but manually entering projectA (no quotes) in a tags-todo search *does* work - so maybe my problem isn't regexes, but something else with my org-agenda-custom-commands . . . . (setq org-agenda-custom-commands '(("1" tags-todo "projectA"))) On Sun, Jun 28, 2020 at 5:39 PM Nathan Neff wrote: > Still isn't working with org-mode 9.3.7 (org-20200622) and > using emacs -q > > I have this file: > > * One > :project:a:work:boss:projectA: > :PROPERTIES: > :Effort: 1:00 > :END: > * Two > :projectB: > :PROPERTIES: > :Effort: 2:00 > :END: > > * Bar > :pt:project:b: > > > And this custom view returns nothing: > (setq org-agenda-custom-commands > '(("1" tags-todo "{projectA}"))) > > If I do a tags-todo search manually and use this syntax: {projectA} > it works. > > Ideas? > > On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff wrote: > >> G I tried "package update" and package mgr in Emacs kept telling me >> that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 - >> I'll try that first >> after I figure out how to get that "package" or whatever that thing is to >> actually show the latest >> versions of packages. >> >> On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff >> wrote: >> >>> >>> >>> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer wrote: >>> >>>> Nathan Neff writes: >>>> >>>> > I'm having a difficult time using regular expressions in custom >>>> > "tags-todo" agenda views. >>>> > >>>> > Is it possible to create custom agenda views using regular >>>> expressions, >>>> > and if so, do I need to escape certain characters? >>>> > >>>> > I can't get a simple regex like this to work, so I'm suspecting that >>>> > I'm doing something wrong or, it's simply not possible to create >>>> custom >>>> > agenda views that use regular expressions to search for tags. >>>> > >>>> > For example, this expression doesn't even find headings with >>>> :projectA: >>>> > as a tag >>>> > >>>> > (setq org-agenda-custom-commands >>>> > '( >>>> > ("1" tags-todo "{projectA}"))) >>>> >>>> My understanding is that the above should work. I tried your >>>> org-agenda-custom-commands value with this agenda file: >>>> >>>> * TODO a >>>> :projectA: >>>> * TODO b >>>> :projectB: >>>> * TODO c >>>> :project: >>>> >>>> With an otherwise vanilla configuration and master (0c1740c91) checked >>>> out, I see >>>> >>>> Headlines with TAGS match: {projectA} >>>> Press ‘C-u r’ to search again >>>> scratch:TODO a >>>> :projectA: >>>> >>>> I see the same thing on maint (3ed035ce3). >>>> >>> >>> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs >>> -q >>> >>> I had some other issues w/regexes and Bastien fixed them in "maint": >>> >>> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef >>> >>> Is it relatively easy to try org-mode's "maint" version (e.g. just check >>> out branch from >>> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint" >>> version to see what's up. >>> >>> Thanks, >>> --Nate >>> >>> >>
Re: Using regular expressions in custom agenda views
Still isn't working with org-mode 9.3.7 (org-20200622) and using emacs -q I have this file: * One :project:a:work:boss:projectA: :PROPERTIES: :Effort: 1:00 :END: * Two :projectB: :PROPERTIES: :Effort: 2:00 :END: * Bar :pt:project:b: And this custom view returns nothing: (setq org-agenda-custom-commands '(("1" tags-todo "{projectA}"))) If I do a tags-todo search manually and use this syntax: {projectA} it works. Ideas? On Sun, Jun 28, 2020 at 5:28 PM Nathan Neff wrote: > G I tried "package update" and package mgr in Emacs kept telling me > that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 - > I'll try that first > after I figure out how to get that "package" or whatever that thing is to > actually show the latest > versions of packages. > > On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff wrote: > >> >> >> On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer wrote: >> >>> Nathan Neff writes: >>> >>> > I'm having a difficult time using regular expressions in custom >>> > "tags-todo" agenda views. >>> > >>> > Is it possible to create custom agenda views using regular expressions, >>> > and if so, do I need to escape certain characters? >>> > >>> > I can't get a simple regex like this to work, so I'm suspecting that >>> > I'm doing something wrong or, it's simply not possible to create custom >>> > agenda views that use regular expressions to search for tags. >>> > >>> > For example, this expression doesn't even find headings with :projectA: >>> > as a tag >>> > >>> > (setq org-agenda-custom-commands >>> > '( >>> > ("1" tags-todo "{projectA}"))) >>> >>> My understanding is that the above should work. I tried your >>> org-agenda-custom-commands value with this agenda file: >>> >>> * TODO a >>> :projectA: >>> * TODO b >>> :projectB: >>> * TODO c >>> :project: >>> >>> With an otherwise vanilla configuration and master (0c1740c91) checked >>> out, I see >>> >>> Headlines with TAGS match: {projectA} >>> Press ‘C-u r’ to search again >>> scratch:TODO a >>> :projectA: >>> >>> I see the same thing on maint (3ed035ce3). >>> >> >> Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs >> -q >> >> I had some other issues w/regexes and Bastien fixed them in "maint": >> >> https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef >> >> Is it relatively easy to try org-mode's "maint" version (e.g. just check >> out branch from >> https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint" >> version to see what's up. >> >> Thanks, >> --Nate >> >> >
Re: Using regular expressions in custom agenda views
G I tried "package update" and package mgr in Emacs kept telling me that Org 9.3.6 was the latest. Now I look @ orgmode.org and see 9.3.7 - I'll try that first after I figure out how to get that "package" or whatever that thing is to actually show the latest versions of packages. On Sun, Jun 28, 2020 at 5:27 PM Nathan Neff wrote: > > > On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer wrote: > >> Nathan Neff writes: >> >> > I'm having a difficult time using regular expressions in custom >> > "tags-todo" agenda views. >> > >> > Is it possible to create custom agenda views using regular expressions, >> > and if so, do I need to escape certain characters? >> > >> > I can't get a simple regex like this to work, so I'm suspecting that >> > I'm doing something wrong or, it's simply not possible to create custom >> > agenda views that use regular expressions to search for tags. >> > >> > For example, this expression doesn't even find headings with :projectA: >> > as a tag >> > >> > (setq org-agenda-custom-commands >> > '( >> > ("1" tags-todo "{projectA}"))) >> >> My understanding is that the above should work. I tried your >> org-agenda-custom-commands value with this agenda file: >> >> * TODO a >> :projectA: >> * TODO b >> :projectB: >> * TODO c >> :project: >> >> With an otherwise vanilla configuration and master (0c1740c91) checked >> out, I see >> >> Headlines with TAGS match: {projectA} >> Press ‘C-u r’ to search again >> scratch:TODO a >> :projectA: >> >> I see the same thing on maint (3ed035ce3). >> > > Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs -q > > I had some other issues w/regexes and Bastien fixed them in "maint": > > https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef > > Is it relatively easy to try org-mode's "maint" version (e.g. just check > out branch from > https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint" > version to see what's up. > > Thanks, > --Nate > >
Re: Using regular expressions in custom agenda views
On Sun, Jun 28, 2020 at 4:12 PM Kyle Meyer wrote: > Nathan Neff writes: > > > I'm having a difficult time using regular expressions in custom > > "tags-todo" agenda views. > > > > Is it possible to create custom agenda views using regular expressions, > > and if so, do I need to escape certain characters? > > > > I can't get a simple regex like this to work, so I'm suspecting that > > I'm doing something wrong or, it's simply not possible to create custom > > agenda views that use regular expressions to search for tags. > > > > For example, this expression doesn't even find headings with :projectA: > > as a tag > > > > (setq org-agenda-custom-commands > > '( > > ("1" tags-todo "{projectA}"))) > > My understanding is that the above should work. I tried your > org-agenda-custom-commands value with this agenda file: > > * TODO a > :projectA: > * TODO b > :projectB: > * TODO c > :project: > > With an otherwise vanilla configuration and master (0c1740c91) checked > out, I see > > Headlines with TAGS match: {projectA} > Press ‘C-u r’ to search again > scratch:TODO a > :projectA: > > I see the same thing on maint (3ed035ce3). > Thanks - I'm using Org 9.3.6 and I'm getting no matches when using emacs -q I had some other issues w/regexes and Bastien fixed them in "maint": https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef Is it relatively easy to try org-mode's "maint" version (e.g. just check out branch from https://code.orgmode.org/bzg/org-mode ?) I'll try using the "maint" version to see what's up. Thanks, --Nate
Using regular expressions in custom agenda views
I'm having a difficult time using regular expressions in custom "tags-todo" agenda views. Is it possible to create custom agenda views using regular expressions, and if so, do I need to escape certain characters? I can't get a simple regex like this to work, so I'm suspecting that I'm doing something wrong or, it's simply not possible to create custom agenda views that use regular expressions to search for tags. For example, this expression doesn't even find headings with :projectA: as a tag (setq org-agenda-custom-commands '( ("1" tags-todo "{projectA}"))) I have the regex surrounded in {} because of the documentation about doing a tags search - do I need those when using a custom agenda view? The info page says: "The second parameter is the search type followed by the string or regular expression to be used for the matching" - how do I specify a regular expression versus a simple string? This attempt gives me back a bunch of headings that simply match :project: but have no capital A anywhere in the tags. (setq org-agenda-custom-commands '( ("1" tags-todo "project[A]"))) Any help appreciated Thanks, --Nate
Agenda: Default view missing 40th character
Hello all, I have had the 40th character missing from my agenda view, like this: Weeklytodo Expenses - Intern t and Friends :hab: habittodo [#A] Inbox, Check Calendars :hab: habittodo [#A] Unmount / Ba kup Notes Note how the 40th character is rendered as a space (the second line already has a space at the 40th character). Any ideas? Org mode version 9.2.5 (9.2.5-1-gff6508-elpa @ Emacs version 27.0.50 Thanks, --Nate
Org Babel: Submit SQL to command line app & capture results
Hello all, I would like to use org-babel to have SQL code like this: * Some heading #+begin_src something SELECT COUNT(*) FROM some_table; #+end_src I would like to have the code highlighted as SQL. However, I'm not reading from a DB matching the requirements of https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sql.html What I would like to do when I run the code above is to: 1) simply take the contents of the code and push it into a tmp file 2) run a shell program on the tmp file: impala-shell -f tmp file.txt 3) Capture the STDOUT from the above command How would I do this using org-babel? Create a new "language"? Are there already similar implementations which basically take the contents of the source code, save to a temp file then execute a standalone program and capture results? Again, I would like to have SQL style highlighting. Thanks for pointers -- I'm sure this is something that's reasonably easy to implement - I just don't want to start off on the wrong foo.t --Nate
Custom block agendas: Set buffer name
Hello all, I'm playing with block agendas and I'm wondering how to set a specific buffer name. In non-block agendas, I can set the buffer name like this: (setq org-agenda-custom-commands (append '( ("p" "Simple list of active projects" tags-todo "PRIORITY<\"C\"+project-inactive/-cancelled-done" ((org-agenda-prefix-format " %?-12t% s") (org-agenda-buffer-name "Top Level Active Projects") (org-agenda-sorting-strategy (quote (priority-down) But I can't find where to specify org-agenda-buffer-name in a custom block agenda - for example, in the docs: https://orgmode.org/manual/Block-agenda.html Where would I add the org-agenda-buffer-name? Thanks, --Nate
Re: Agenda: How to bulk mark regex w/spaces?
Thanks Bastien for your hard work - I'm famous! https://code.orgmode.org/bzg/org-mode/commit/c0d08b7efe740c17a3eec28984161c05e43da5ef On Wed, Feb 12, 2020 at 1:01 PM Bastien wrote: > Hi Nathan, > > thanks for sticking with me on this one! You're right, it's when the > match happens at the end of the line, I've pushed a fix in maint. > > Thanks! > > -- > Bastien >
Re: Agenda: How to bulk mark regex w/spaces?
Whoops sorry wanted to reference the source code: https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-agenda.el#L10147 I think that the problem is the call to org-agenda-bulk-mark on line 10160 (it doesn't mark if the point is at the EOL) https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-agenda.el#L10160 On Wed, Feb 12, 2020 at 11:49 AM Nathan Neff wrote: > Hi Bastien, > > I'm using emacs -u NONE with emacs 27.0.50 > and Org mode version 9.2.5 > > And I'm not seeing this expected behavior. > > I have the following simple foo.org file for my agenda: > * TODO Foo > * TODO Pre Class > * TODO Again > > I'm using the built-in agenda view for TODO entries ("t") > and I'm searching using > > Pre\sClass > {Pre\sClass} > Pre Class > "Pre Class" > > And the entry is not *marked* in the agenda, but there are messages > saying "1 entries marked for bulk action" > > If I search for "Pre Clas" and "Pre\sCl" etc. the entries are marked. > > If I search for "Class" (no quotes) then there's no match. However, if I > search for "Cla" (no quotes) then there is a match and the heading is > marked. > > So, it appears there's a problem *if the match ends on the last character > of the heading*. > > In fact, I can replicate the problem by searching in the agenda manually > by searching for "Class" > (no quotes) :) and then calling (call-interactively 'org-agenda-bulk-mark) > - the mark is not made and > there's a message "user-error: Nothing to mark at point" > > Not sure how to fix it but wanted to show my awesome debugging skills :))) > > Thanks, > --Nate > > Thanks, > --Nate > > > > On Tue, Feb 11, 2020 at 5:22 PM Bastien wrote: > >> Hi Nathan, >> >> Nathan Neff writes: >> >> > I'm trying to use org-agenda-bulk-mark-regexp and trying to search >> > for >> > headings having "Pre Class". >> > >> > None of the combinations have worked so far (I've tried with quotes >> > and without quotes in the prompt) >> >> There is nothing special with the regexps you need to enter with >> `org-agenda-bulk-mark-regexp', you can use the same syntax you would >> use for, e.g., C-u C-s in Emacs. >> >> Note that only the text of the headline is considered, not part of >> the agenda line that are not the heading itself (e.g. todo keywords, >> tags, etc.) >> >> > Pre Class >> >> should work >> >> > Pre\sClass >> >> => Pre\s-Class should work >> >> > Pre\\sClass >> >> nope >> >> > Pre.*Class >> >> should work >> >> > {Pre Class} >> >> nope. >> >> HTH, >> >> -- >> Bastien >> >
Re: Agenda: How to bulk mark regex w/spaces?
Hi Bastien, I'm using emacs -u NONE with emacs 27.0.50 and Org mode version 9.2.5 And I'm not seeing this expected behavior. I have the following simple foo.org file for my agenda: * TODO Foo * TODO Pre Class * TODO Again I'm using the built-in agenda view for TODO entries ("t") and I'm searching using Pre\sClass {Pre\sClass} Pre Class "Pre Class" And the entry is not *marked* in the agenda, but there are messages saying "1 entries marked for bulk action" If I search for "Pre Clas" and "Pre\sCl" etc. the entries are marked. If I search for "Class" (no quotes) then there's no match. However, if I search for "Cla" (no quotes) then there is a match and the heading is marked. So, it appears there's a problem *if the match ends on the last character of the heading*. In fact, I can replicate the problem by searching in the agenda manually by searching for "Class" (no quotes) :) and then calling (call-interactively 'org-agenda-bulk-mark) - the mark is not made and there's a message "user-error: Nothing to mark at point" Not sure how to fix it but wanted to show my awesome debugging skills :))) Thanks, --Nate Thanks, --Nate On Tue, Feb 11, 2020 at 5:22 PM Bastien wrote: > Hi Nathan, > > Nathan Neff writes: > > > I'm trying to use org-agenda-bulk-mark-regexp and trying to search > > for > > headings having "Pre Class". > > > > None of the combinations have worked so far (I've tried with quotes > > and without quotes in the prompt) > > There is nothing special with the regexps you need to enter with > `org-agenda-bulk-mark-regexp', you can use the same syntax you would > use for, e.g., C-u C-s in Emacs. > > Note that only the text of the headline is considered, not part of > the agenda line that are not the heading itself (e.g. todo keywords, > tags, etc.) > > > Pre Class > > should work > > > Pre\sClass > > => Pre\s-Class should work > > > Pre\\sClass > > nope > > > Pre.*Class > > should work > > > {Pre Class} > > nope. > > HTH, > > -- > Bastien >
Agenda: How to bulk mark regex w/spaces?
Hello all, I'm trying to use org-agenda-bulk-mark-regexp and trying to search for headings having "Pre Class". None of the combinations have worked so far (I've tried with quotes and without quotes in the prompt) Pre Class Pre\sClass Pre\\sClass Pre.*Class {Pre Class} It appears that the function is simply using the (re-search-forward) function, and I've tried simply calling :(re-search-forward "Pre Class") in the agenda, and the text is indeed found. Therefore, I'm wondering if the prompt for the regex is somehow mangling the input to the function itself? Thanks, --Nate
Agenda: Display timeline for today
Hello all, I was searching for a way to display today's clocked items in a timeline style view e.g.: 10:00 - 10:15 foo 11:00 - 11:15 bar I found this Stack Overflow thread: https://emacs.stackexchange.com/questions/19746/get-a-timeline-of-clocked-time-in-org-mode One of the replies says to "Look into org-agenda-prefix-format to show start and end time" but doesn't specify how to do this. Any ideas? Looking at org-agenda-prefix-format I don't see anything regarding a start time or end time. I'm guessing I could code a function to get a start and end time. I looked around and found some code in org-element.el and I think that org-element-timestamp-parser may be what I need, but wanted to see if anyone has done something similar. Thanks, --Nate
Babel: Store script in external file
Hello all, I think I'm missing something basic: I'd like to have something like this: #+begin_src python #+filename: foo.py Instead of storing my Python code in the current org file, I would like Babel to read foo.py and execute it, as if it was inside the .org file. The foo.py mentioned above is fairly large, and I would like the code to be stored in a different file than my .org file, for brevity. Any ideas? I feel like I'm missing something obvious. Thanks, --Nate
Babel: Set org-babel-min-lines-for-block-output for single code block?
Hello all, I just found the org-babel-min-lines-for-block-output variable. I have a table like this: #+RESULTS: people-table | User | ID | Homepage | |---++--| | Bob | 1 | http://example.com/bob | | Steve | 2 | http://example.com/steve | And a code block like this: #+begin_src python :var people=people-table :results output for i, person in enumerate(people): print('- ' + person[0]) print(" " + person[2]) #+end_src I would like to set org-babel-min-lines-for-block-output variable for only the above code block. Is this possible using #+property or something like that? Or do I need to have a "wrapper" elisp block around my python code? Thanks, --Nate
Agenda: Display scheduled items only once
Hello all, How can I tell org-mode to only show me a scheduled todo item once in my agenda? IMHO the format below becomes pretty formidable if I have a bunch of scheduled items from the past, because the items will show up on the original day (e.g. Thursday in the example below) *and* on today's date. I would like the items only to show up on today's date. Thursday 14 November 2019 Scheduled: todo [#A] Do something Saturday 16 November 2019 Sched. 2x: todo [#A] Do something This is in the default weekly / daily org-agenda-view. This seems like an odd "default" behavior - to me, seeing something has been scheduled for 2x is sufficient - I don't need to see the same entry under the past day which it was scheduled for. Am I missing some basic setting? I might change the default org-agenda-start-day to start to today's date if that would "fix" this "issue" :) Thanks, --Nate
Using variables in org-capture-templates
Hello all, I'm sure this is a basic elisp thing but I'd like some help: I wanted to abstract the "sprintf-like" formats of the template expansion into readable variables that I can reuse in my templates. However, upon substituting variable for the formats, I am getting "Invalid capture template" for the capture template "T" below -- for comparison the "t" template works. What am I doing wrong? I'm sure it has to do with the '() value of org-capture templates, and the fact that the (concat) is not evaluated. What is the "correct" way to do this in elisp? Here's my code: #+begin_src emacs-lisp (setq org-capture-templates '()) (setq njn-clocked-entry "\nclocked: %K\n") (setq njn-from-entry "\nfrom: %a\n") (setq njn-capture-trailer "\n--\n") (setq org-capture-templates '( ("T" "Todo: Detailed" entry (file+headline "" "Tasks") (concat "* todo %^{Heading}\n%U\n%?" njn-from-entry njn-clocked-entry njn-capture-trailer) :prepend t) ("t" "Todo: Basic" entry (file+headline "" "Tasks") "* todo %^{Heading}\n%U\n%?\nclocked: %K\n" :prepend t))) Thanks, --Nate
Publish to PDF on Linux: An impossible task?
After using org-mode for 10 years, I run for the doorway when I even think about trying to convert an org-mode file to PDF. *** I quiver when I see errors such as: warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/bin:/usr/bin/share/texmf-local/web2c:/usr/bin/share/texmf-dist/web2c:/usr/bin/share/texmf/web2c:/usr/bin/texmf-local/web2c:/usr/bin/texmf-dist/web2c:/usr/bin/texmf/web2c:/usr:/usr/share/texmf-local/web2c:/usr/share/texmf-dist/web2c:/usr/share/texmf/web2c:/usr/texmf-local/web2c:/usr/texmf-dist/web2c:/usr/texmf/web2c://texmf-local/web2c:/://share/texmf-local/web2c://share/texmf-dist/web2c://share/texmf/web2c://texmf-local/web2c://texmf-dist/web2c://texmf/web2c. This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex) kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: No such file or directory I can't find the format file `pdflatex.fmt'! *** I run for cover when I read documentation such as: https://orgmode.org/manual/LaTeX-Export.html#LaTeX-Export I think people who have been using LaTex and related tools for a long time have no issue with this (seemingly) insurmountable feat. However, I am not familiar with such a myriad of tools and I'm simply looking for the "easiest" way to convert/export an org mode file to PDF on Linux. Can anyone point me to some tutorials? I'm sorry if I miss something obvious. Thanks, --Nate
Wow - clockcheck
Another zesty discovery that I made today after using org for like 10 years is "clockcheck" mode in Agenda (v c). I have never known about that (or forgot about it). I haven't run the git-blame on that feature though, I don't want to have a big gap in my clock times between tasks :) Thanks, --Nate
Wow - org-notify
I have not put effort estimates on my tasks for a long time. Tonight, I was playing chess and saw a "notify" message come up on my Linux box that should be finished by now. Wow - I never knew org-mode had that built-in! I ran a git-blame on the org-source code [1] and it's been a long time, right? I haven't tested whether it sends a Growl notification on OSX but that's really cool! (It was kinda creepy at first, though) Thanks, --Nate [1] https://github.com/emacs-mirror/emacs/blame/f8284f1e408b38e6a3c0e2a1d5a465fefac6800a/lisp/org/org-clock.el#L698
Capture to heading of current cursor
Hello all, I know I've asked this before, but can't remember the quick & easy path (TM) to creating an org-capture template which will capture to the current heading? It would be cool to simply "re-use" my existing capture templates and override the destination to "wherever my cursor is now" -- this would allow me to keep all the capture templates and avoid defining new ones with only the target re-defined. Any ideas? Thanks, --Nate
Org meta up/down and left/right behavior
Hello all, I noticed for the first time the difference in the shift key behavior in the following function groups: org-meta up/down versus org-shiftmeta up/down and org-meta left/right versus org-shift meta left/right With the up/down behavior the shift key being pressed indicates that I wish to only bring the main heading up/down. With the left/right behavior the shift key indicates that I wish to bring the entire subtree left / right. This behavior seems to be inconsistent -- am I correct? I noticed this only today - I use the left/right behavior the most often and map the shift key to mean "Take the entire subtree". Today I was moving some headlines up/down and noticed this difference. Has anyone made this behavior consistent by mapping keys or some other method? It seems that changing these specific mappings could impact other aspects (e.g. table rows) which may cause other inconsistencies -- thus the difference in behavior of the shift key :-) Thanks, --Nate
tags-todo agenda: Show scheduling info
Hello all, I'm having trouble with simply trying to show any scheduling information about a heading in a tags-todo search. Can someone point me to how to do this? I thought that I define a custom agenda command like this: (setq org-agenda-custom-commands '( ("p" "Foo" tags-todo "+foo" ( (org-agenda-prefix-format "Hello World %s") (org-agenda-remove-times-when-in-prefix nil) (org-agenda-todo-ignore-with-date nil) And have data like this: * todo Something:foo: SCHEDULED: <2019-11-02 Sat> I want my agenda view to show that this entry is scheduled. However, all I get is this: Hello World Something :foo: >From the documentation for org-agenda-prefix-format it seems that %s should do the trick, right? I've even tried tinkering with org-agenda-remove-times-when-in-prefix. Any ideas? Thanks, --Nate
Re: org-refile-target-verify-function - use inherited tag & todo
Thanks Gustavo, notes below: On Sun, Oct 27, 2019 at 5:58 PM Gustavo Barros wrote: > Hi Nate, > > On Sun, Oct 27 2019, Nathan Neff wrote: > > > 1) My org-agenda-files show up in the list. For example, foo.org and > bar.org show up in the refile targets, despite the > > function should return nil if a heading does not contain "Tasks" > > Curiously, I’ve been scratching this itch just today. So I might as well > share. > > I presume you are using some of the specific values of > `org-refile-use-outline-path'. If that’s the case, the file level as a > refile target is hardcoded in `org-refile-get-targets', independently of > what you might have in `org-refile-target-verify-function'. > > We have somewhere in `org-refile-get-targets': > > #+begin_src emacs-lisp > (when (eq org-refile-use-outline-path 'file) > (push (list (file-name-nondirectory f) f nil nil) tgs)) > (when (eq org-refile-use-outline-path 'buffer-name) > (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs)) > (when (eq org-refile-use-outline-path 'full-file-path) > (push (list (file-truename (buffer-file-name (buffer-base-buffer))) f > nil nil) tgs)) > #+end_src > > (`tgs' is the local variable which is collecting candidates for return). > > So, you might not use `org-refile-use-outline-path'. In this case the > file info will be provided in the end of the refile target in > parentheses (for targets outside the current buffer). And the file level > will not be offered as a target. > > I, however like `org-refile-use-outline-path' and set it to 'file. But I > also want to not be able to refile to the file level. So I advised > `org-refile-get-targets' with: > > #+begin_src emacs-lisp > (defun my/org-refile-filter-targets (orig-fun &rest args) > (let ((targets (apply orig-fun args)) > (agenda-files (mapcar #'file-name-nondirectory org-agenda-files))) > (cl-remove-if (lambda (x) > (member (car x) agenda-files)) > targets))) > (advice-add 'org-refile-get-targets :around #'my/org-refile-filter-targets) > #+end_src > > This presumes (setq org-refile-use-outline-path 'file). If you use any > other value, you should probably adjust the function’s let bound > variables for the case. This is also sort of hackish, so exert your own > due caution in choosing whether or not to use it. > Indeed, I do use org-refile-use-outline-path 'file. However, I have a simple directory specified for my org-agenda-files. ("~/org-mode") Therefore I'll need to do something a bit different. It appears that your solution creates "targets" which is the targets list of course, and then it creates "agenda-files" which goes through org-agenda-files and finds all the filenames in org-agenda files. It then mutates "targets", and removes any entry which is a filename from org-agenda-files. Since my org-agenda-files is simply ("~/org-mode/") none of the entries match. Hmmm, let me ask: Why not simply go through targets and remove any entry whose value is a simple filename? Why search org-agenda-files first? This function also assumes that the org-refile-targets always comes from org-agenda-files. I'll play with your function and see what I can get -- thank you for the head-start! Thanks --Nate > > HTH, > Gustavo. >
Anyone use 3rd party search tools w/org-mode?
Hello all, I'm considering "indexing" my org-mode files and haven't done any research into this. I'm sure there's 100 different ways to do this but wanted to ask the list if anyone is indexing their org-mode files and using a search tool like Solr, Elastic or smaller indexing engines to search their org-files. Emacs integration obviously would be a plus. Thanks for any feedback, --Nate
org-refile-target-verify-function - use inherited tag & todo
Hi all, I want to filter my refile targets to "Tasks" headings. This snippet works: https://lists.gnu.org/r/emacs-orgmode/2016-02/msg00088.html There's a few things I'd like to improve on: 1) My org-agenda-files show up in the list. For example, foo.org and bar.org show up in the refile targets, despite the function should return nil if a heading does not contain "Tasks" 2) I would like to limit the "Task" headings to those that have a parent heading with a tag :project: I have :project: tag as exclude-from-inheritance, so this might be tricky 3) I would like the parent heading with :project: tag to have a TODO state that is not "done" and is not "cancelled". Can anyone help me improve on this? I think I'm missing some really easy documentation / examples. As an aside, is there a definitive "Org Mode API" doc that shows the functions that would assist me in writing a function to perform the above filtering? Something like a Javadoc for Org-Mode? There's great articles, etc. but I think it would be cool to have a "public" API defined / documented - otherwise it seems that I'm simply going through existing blogs, documentation etc and of course the source code. When going through source code, there's many functions that are named similarly and yes there's docs but I found myself wanting some kind of Javadoc-ish API documentation :) Thanks, --Nate
[O] Scroll Agenda Dispatcher window
Hello all, Sometimes (recently) I have quite a few custom agenda commands and if the window is not large enough, I can't view all of the available agenda custom commands - what is the keyboard shortcut to scroll / display the lower section of the custom agenda commands? Thanks, --Nate
Re: [O] Help with "macro"
I'm getting there - I found (org-element-property :PROJ (org-element-at-point)) from a regular org-mode file - now I just need to jump there from the agenda. On Sat, Oct 12, 2019 at 12:18 PM Nathan Neff wrote: > I'm trying to implement a function to display the TODO items of the > currently highlighted > item in the agenda and have a few questions: > > Goal: > > 1) From the agenda, place the cursor on a heading. > 2) Press a key and instantly narrow the agenda to the heading which the > cursor is on. > 3) Display org-todo-list for the "narrowed" item in a new buffer, with the > name "agenda for " or perhaps "agenda for the narrowed item" > 4) Keep the existing original agenda view (using sticky or some other > tactic). > > Here's what I have so far: > (defun njn-show-tasks-for-project() >(interactive) >;; (setq preval org-agenda-sticky) >;; (message "preval is: ") >(call-interactively 'org-agenda-set-restriction-lock-from-agenda) >;; (org-toggle-sticky-agenda 't) >(setq org-agenda-buffer-name "JarJarBarBar") >(call-interactively 'org-todo-list) >;; (org-toggle-sticky-agenda preval) > ) > > This works, but my original agenda view is updated to be restricted. > I've been tinkering with the "sticky" view for the agenda. Also, I would > like to set the name of the new buffer to either the heading which my > cursor > is on in the agenda, or perhaps a property of the heading which my cursor > is > on in the agenda. > > As you can see, I tried to set a "preval" variable to the current > stickiness of the agenda > and then reset the value after calling org-todo-list, but this has not > worked out for me so far. > > Any ideas? > > Thanks, > --Nate >
[O] Help with "macro"
I'm trying to implement a function to display the TODO items of the currently highlighted item in the agenda and have a few questions: Goal: 1) From the agenda, place the cursor on a heading. 2) Press a key and instantly narrow the agenda to the heading which the cursor is on. 3) Display org-todo-list for the "narrowed" item in a new buffer, with the name "agenda for " or perhaps "agenda for
[O] Dates with repeaters, times and range
Hello all, I have a question that's probably FAQ material but I was wondering what the "best" way to do something like this would be: I have a meeting that's scheduled from 10:00 - 11:00 for the next three days. I tried to create a heading with this property: <2019-10-02 Wed 08:30-15:00 +1d>--<2019-10-04 Fri 08:30-15:00 +1d> and I also tried this: <2019-10-02 Wed 08:30-15:00>--<2019-10-04 Fri 08:30-15:00> but the agenda shows Wednesday with the 8:30 - 15:00 and the Friday with the 15:00 but on Thursday it shows simply 2/3. - Is there a way to fix get Thursday to show up in the agenda with the times blocked out? I'd like to have the benefit of blocking out the time, as well as avoiding the need to define a new heading for every day. Thanks, --Nate
Re: [O] PPTX link: Open with PowerPoint on Mac
Here it is: https://orgmode.org/manual/External-Links.html#External-Links I was looking here: https://orgmode.org/manual/External-links.html - but wait, what's the difference? Whoa, the "l" is lower case on the second link - looks like a doc / publishing bug - one page has 4.3 and the other says 4.4. What do I need to do to report this doc / publishing bug? Thanks, --Nate On Fri, Sep 27, 2019 at 5:50 AM Nathan Neff wrote: > > > On Fri, Sep 27, 2019 at 4:45 AM Takaaki Ishikawa wrote: > >> I think you may have to put “file+sys:/“ before your path. >> >> For example: file+sys://Users/nate/some_pptx.pptx >> > > Thank you Takaaki very much! This worked great! > > >> >> Best, >> Takaaki >> >> > On Sep 27, 2019, at 18:42, Nathan Neff wrote: >> > >> > Hello all, >> > >> > I have a simple path in org-mode >> > >> > /Users/nate/some_pptx.pptx >> > >> > When I press C-c C-o it opens the file in binary mode in Emacs. >> > >> > A path to a PDF will actually open the file with the associated program: >> > /Users/nate/some_png.png -> Opens in Preview when I press C-c C-o >> > >> > How can I get emacs / org to open pptx files in the same fashion as if >> I had >> > double-clicked using Finder on Mac? >> > >> > Thanks, >> > --Nate >> >>
Re: [O] PPTX link: Open with PowerPoint on Mac
On Fri, Sep 27, 2019 at 4:45 AM Takaaki Ishikawa wrote: > I think you may have to put “file+sys:/“ before your path. > > For example: file+sys://Users/nate/some_pptx.pptx > Thank you Takaaki very much! This worked great! > > Best, > Takaaki > > > On Sep 27, 2019, at 18:42, Nathan Neff wrote: > > > > Hello all, > > > > I have a simple path in org-mode > > > > /Users/nate/some_pptx.pptx > > > > When I press C-c C-o it opens the file in binary mode in Emacs. > > > > A path to a PDF will actually open the file with the associated program: > > /Users/nate/some_png.png -> Opens in Preview when I press C-c C-o > > > > How can I get emacs / org to open pptx files in the same fashion as if I > had > > double-clicked using Finder on Mac? > > > > Thanks, > > --Nate > >
[O] PPTX link: Open with PowerPoint on Mac
Hello all, I have a simple path in org-mode /Users/nate/some_pptx.pptx When I press C-c C-o it opens the file in binary mode in Emacs. A path to a PDF will actually open the file with the associated program: /Users/nate/some_png.png -> Opens in Preview when I press C-c C-o How can I get emacs / org to open pptx files in the same fashion as if I had double-clicked using Finder on Mac? Thanks, --Nate
Re: [O] Basic Q: Display specific property in custom agenda view
Thanks Eric, this does it! On Thu, Sep 26, 2019 at 12:27 AM Fraga, Eric wrote: > On Thursday, 26 Sep 2019 at 00:06, Nathan Neff wrote: > > Got it! Now, all I need to do is add the cool ":" functionality > > where a ":" is appended to the result if there is a result :-) > > Maybe something like > > ;; Return PROJ property or category property > (defun njn-get-proj-property() > (if (org-entry-get (point) "PROJ" t) > (concat (org-get-category) ":") > "")) > > (untested) > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d >
Re: [O] Basic Q: Display specific property in custom agenda view
Got it! Now, all I need to do is add the cool ":" functionality where a ":" is appended to the result if there is a result :-) Using %-12:(njn-get-proj-property) doesn't work like %-12:c :-( ;; Return PROJ property or category property (defun njn-get-proj-property() (or (org-entry-get (point) "PROJ" t) (org-get-category))) (setq org-agenda-custom-commands '( ("A" agenda "" ( (org-agenda-span 'day) (org-agenda-prefix-format " %-12(njn-get-proj-property) %?-12t% s") (org-agenda-include-inactive-timestamps nil))) On Wed, Sep 25, 2019 at 11:16 PM Nathan Neff wrote: > > On Wed, Sep 25, 2019 at 7:12 PM Nathan Neff wrote: > >> Hello all, >> >> My apologies for not finding this in the docs, but I'm trying to define a >> simple custom agenda view that is exactly the same as the default day >> week view, >> except the only difference is displaying a property called FOO instead of >> the CATEGORY >> property. >> >> > I found an example here: > https://lists.gnu.org/archive/html/emacs-orgmode/2016-04/msg00402.html > > Thanks, > --Nate > > >> I think it's simply a matter of setting org-agenda-prefix-format to >> something >> other than the default: " %i %-12:c%?-12t% s" but I can't find the exact >> function to call >> in place of %i. I would think there's something like >> %(get-property-of-heading(FOO)) >> >> Thanks for any advice >> --Nate >> >
Re: [O] Basic Q: Display specific property in custom agenda view
On Wed, Sep 25, 2019 at 7:12 PM Nathan Neff wrote: > Hello all, > > My apologies for not finding this in the docs, but I'm trying to define a > simple custom agenda view that is exactly the same as the default day week > view, > except the only difference is displaying a property called FOO instead of > the CATEGORY > property. > > I found an example here: https://lists.gnu.org/archive/html/emacs-orgmode/2016-04/msg00402.html Thanks, --Nate > I think it's simply a matter of setting org-agenda-prefix-format to > something > other than the default: " %i %-12:c%?-12t% s" but I can't find the exact > function to call > in place of %i. I would think there's something like > %(get-property-of-heading(FOO)) > > Thanks for any advice > --Nate >
[O] Basic Q: Display specific property in custom agenda view
Hello all, My apologies for not finding this in the docs, but I'm trying to define a simple custom agenda view that is exactly the same as the default day week view, except the only difference is displaying a property called FOO instead of the CATEGORY property. I think it's simply a matter of setting org-agenda-prefix-format to something other than the default: " %i %-12:c%?-12t% s" but I can't find the exact function to call in place of %i. I would think there's something like %(get-property-of-heading(FOO)) Thanks for any advice --Nate
[O] Org-capture %a expansion - create ID link
Hello all, I'm using capture templates with the %a expansion element [1] The documentation says: "Annotation, normally the link created with org-store-link." The expansion results in links like this: file:~/org-mode/inbox.org::*Heading This not really so good, because I routinely refile things in my inbox - which renders the link useless. Is there a way to force org-capture to generate a link with a globally unique ID? A brief look at the code https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-capture.el#L631 seems to suggest that org-store-link is called with a nil argument - I don't know what that exactly does but I wonder if that's what is causing the generated link to behave differently than when org-store-link is called interactively? I would also like a globally unique ID generated for the currently clocked item (the %K expansion element), but hey, one thing at a time, right? :-) Any ideas? Thanks, --Nate [1] https://orgmode.org/manual/Template-expansion.html#Template-expansion
Re: [O] Org babel tangle: Don't export code
On Wed, Sep 25, 2019 at 12:54 AM Ken Mankoff wrote: > > On 2019-09-25 at 01:07 +02, Tim Cross wrote... > > I just put :tangle no in the block header e.g. > > > > #+begin_src emacs-lisp :tangle no > > > > #+end_src > > Also, > > * COMMENT Section > #+BEGIN_SRC > # not exported because of COMMENT > #+END_SRC > > -k. > > Wow - sorry guys but this is really hard to understand - also I found that the following code will mess up my config - all of my *other* code blocks are *not* "tangled" and the only code block which is "tangled" is the one which I issue :tangle yes fo. #+BEGIN_SRC emacs-lisp :tangle yes (some emacs lisp here) #+END_SRC The documentation is really vague here and I did not expect it. I mean, I set :tangle no according to Tim Cross, and that's fine - the code is not tangled. Then I change it to :tangle yes and then it's the *only* block which is tangled? How could I get that from the docs here? https://orgmode.org/manual/Extracting-source-code.html I'll propose a change to the docs and submit it - I just want to know if I'm misunderstanding something about the docs or if others find that the docs could use some rephrasing (suggestions welcome). Thanks, --Nate
Re: [O] Org babel tangle: Don't export code
On Tue, Sep 24, 2019 at 8:19 PM Tim Cross wrote: > > There are two different concepts - tangling and exporting. When you > tangle the file, code blocks are written out into code files (possibly > with evaluation etc). This is part of the 'literate programming' support > within org. > Yep - thanks - it's just easy to conflate the two :-) > When you export a file, you are exporting the file > contents into a different format i.e PDF, HTML, markdown etc. By > default, code blocks are not evaluated during this process - they are > just exported 'as-is'. However, sometimes, these code blocks are used to > generate content in the file, so you do want them to be evaluated during > the export (for example, to create a 'results' section, generate an > image that is embedded in the file etc). > > So, if you 'export' your emacs init org file as PDF, it will be exported > as a PDF file where the source blocks will appear as source listings in > the PDF file along with all the other non source block text. If on the > other hand, you tangle your emacs init org file, it will create an .el > file with only the source blocks. > > Nathan Neff writes: > > > Thanks Tim - I wanted to ask the list -- what does " > > > > By default, Org does not tangle the ‘src’ code block on export." mean in > > this web page:https://orgmode.org/manual/Extracting-source-code.html > > I mean, I have all of my begin_src emacs-lisp blocks with no explicit > > :tangle yesand they all are exported to the resulting *.el file. What > does > > the above statement mean? > > > > On Tue, Sep 24, 2019 at 6:14 PM Tim Cross wrote: > > > >> > >> I just put :tangle no in the block header e.g. > >> > >> #+begin_src emacs-lisp :tangle no > >> > >> #+end_src > >> > >> This is how I turn off or remove blocks from my .emacs.d/init.el file, > >> which is tangled from an or file. You can also put a filename. This is > >> what I do for Emacs 27, which introduces the early-init.el file i.e. > >> > >> #+begin_src emacs-lisp :tangle early-init.el > >> > >> #+end_src > >> > >> #+begin_src emacs-lisp :tangle init.el > >> > >> #+end_src > >> > >> Nathan Neff writes: > >> > >> > Hello all, > >> > > >> > I use *.org files to configure my emacs and use org-babel-load-file > >> > to configure my org-mode using *.org files. Love the feature. > >> > > >> > However sometimes I'm experimenting with code blocks, and want to > simply > >> > "turn off" certain code blocks in my *.org files from being executed. > >> > Every time > >> > I go to do this, I search the web for 30-60 minutes and I'm frustrated > >> and > >> > confused by > >> > the myriad options and documentation. > >> > > >> > All I want to do is mark a source code block in my *.org files so that > >> the > >> > particular code block is: > >> > > >> > 1) Not exported to the resulting .el file when tangling > >> > Or > >> > 2) Not ran in the resulting .el files when tangling > >> > > >> > I recently spent 30 minutes to an hour trying to figure out how to > simply > >> > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or > >> > "please don't do this" > >> > to a code block in my *.org files. I don't want to mark the code > block > >> as > >> > "text", unless there's really no other option. > >> > > >> > In my opinion, the documentation does not simply define how to do this > >> > relatively common task. > >> > > >> > Can someone please point me in the right direction? Also I would be > >> > willing to submit a doc-fix or FAQ item if there is currently not an > item > >> > to do so. I'm lost and do not want to spend more time on this > seemingly > >> > easy task. > >> > > >> > Thanks, > >> > --Nate > >> > >> > >> -- > >> Tim Cross > >> > >> > > > -- > Tim Cross >
Re: [O] Org babel tangle: Don't export code
Thanks Tim - I wanted to ask the list -- what does " By default, Org does not tangle the ‘src’ code block on export." mean in this web page:https://orgmode.org/manual/Extracting-source-code.html I mean, I have all of my begin_src emacs-lisp blocks with no explicit :tangle yesand they all are exported to the resulting *.el file. What does the above statement mean? On Tue, Sep 24, 2019 at 6:14 PM Tim Cross wrote: > > I just put :tangle no in the block header e.g. > > #+begin_src emacs-lisp :tangle no > > #+end_src > > This is how I turn off or remove blocks from my .emacs.d/init.el file, > which is tangled from an or file. You can also put a filename. This is > what I do for Emacs 27, which introduces the early-init.el file i.e. > > #+begin_src emacs-lisp :tangle early-init.el > > #+end_src > > #+begin_src emacs-lisp :tangle init.el > > #+end_src > > Nathan Neff writes: > > > Hello all, > > > > I use *.org files to configure my emacs and use org-babel-load-file > > to configure my org-mode using *.org files. Love the feature. > > > > However sometimes I'm experimenting with code blocks, and want to simply > > "turn off" certain code blocks in my *.org files from being executed. > > Every time > > I go to do this, I search the web for 30-60 minutes and I'm frustrated > and > > confused by > > the myriad options and documentation. > > > > All I want to do is mark a source code block in my *.org files so that > the > > particular code block is: > > > > 1) Not exported to the resulting .el file when tangling > > Or > > 2) Not ran in the resulting .el files when tangling > > > > I recently spent 30 minutes to an hour trying to figure out how to simply > > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or > > "please don't do this" > > to a code block in my *.org files. I don't want to mark the code block > as > > "text", unless there's really no other option. > > > > In my opinion, the documentation does not simply define how to do this > > relatively common task. > > > > Can someone please point me in the right direction? Also I would be > > willing to submit a doc-fix or FAQ item if there is currently not an item > > to do so. I'm lost and do not want to spend more time on this seemingly > > easy task. > > > > Thanks, > > --Nate > > > -- > Tim Cross > >
[O] Org babel tangle: Don't export code
Hello all, I use *.org files to configure my emacs and use org-babel-load-file to configure my org-mode using *.org files. Love the feature. However sometimes I'm experimenting with code blocks, and want to simply "turn off" certain code blocks in my *.org files from being executed. Every time I go to do this, I search the web for 30-60 minutes and I'm frustrated and confused by the myriad options and documentation. All I want to do is mark a source code block in my *.org files so that the particular code block is: 1) Not exported to the resulting .el file when tangling Or 2) Not ran in the resulting .el files when tangling I recently spent 30 minutes to an hour trying to figure out how to simply "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or "please don't do this" to a code block in my *.org files. I don't want to mark the code block as "text", unless there's really no other option. In my opinion, the documentation does not simply define how to do this relatively common task. Can someone please point me in the right direction? Also I would be willing to submit a doc-fix or FAQ item if there is currently not an item to do so. I'm lost and do not want to spend more time on this seemingly easy task. Thanks, --Nate
Re: [O] Tables: Exclude headings in Row Number?
I also re-read my initial question and your response *does* address my mis phrased question. To rephrase my question, I have a table with these values: | heading col 0 | heading col 1 | | -- | - | | A | B | C | D I found the org-table-toggle-coordinate-overlays which displays an overlay showing the row number: https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8 I would like to know if there's a way to influence org-table-toggle-coordinate-overlays (e.g. some flag like "don't count rows before headings") Thanks, --Nate On Sun, Sep 22, 2019 at 10:22 PM Nathan Neff wrote: > Hi Neil, > > Unfortunately, no - This code will print the number of rows in my table - > it does > not add a column to my table, with numbering starting at the first row > under the > headline. > > I really like the example, where I can mess with the table using lisp > though - thank > you! > --Nate > > On Thu, Sep 19, 2019 at 9:13 AM Neil Jerram wrote: > >> Does this answer your question? >> >> #+NAME: tt >> | num | ID | >> |-+| >> | 1 | A | >> | 2 | B | >> | 3 | C | >> | 4 || >> | 5 | E | >> >> #+BEGIN_SRC emacs-lisp :var tt=tt >> (length tt) >> #+END_SRC >> >> #+RESULTS: >> : 5 >> >> Best wishes, >> Neil >> >> >> On Wed, 18 Sep 2019 at 18:39, Nathan Neff wrote: >> >>> Hello all, >>> >>> I have a table like this: >>> >>> >>> | ID | >>> || >>> | 2 | >>> | 3 | >>> >>> and I want to know how many rows there are w/o the ID heading >>> and w/o the horizontal separator. I found the >>> org-table-toggle-coordinate-overlays >>> which displays an overlay showing the row number: >>> >>> https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8 >>> >>> However, the heading is included in the row number (which makes sense). >>> >>> Is there a way to ignore lines above a heading (or mark a heading in >>> some way? >>> >>> I found a way to add a seq. number by using Calc [1] but I was wondering >>> if >>> there's a way to tell the org-table-toggle-coordinate-overlays not to >>> count the >>> heading. >>> >>> Thanks, >>> --Nate >>> >>> [1] >>> >>> >>> | num | ID | >>> |-+| >>> | 1 | A | >>> | 2 | B | >>> | 3 | C | >>> | 4 || >>> | 5 | E | >>> #+TBLFM: $1=vlen(@I..0) >>> >>> >>> https://stackoverflow.com/questions/9267050/how-to-achieve-a-row-index-column-in-emacs-org-mode-using-a-calc-column-rule >>> >>> >>>
Re: [O] Tables: Exclude headings in Row Number?
Hi Neil, Unfortunately, no - This code will print the number of rows in my table - it does not add a column to my table, with numbering starting at the first row under the headline. I really like the example, where I can mess with the table using lisp though - thank you! --Nate On Thu, Sep 19, 2019 at 9:13 AM Neil Jerram wrote: > Does this answer your question? > > #+NAME: tt > | num | ID | > |-+| > | 1 | A | > | 2 | B | > | 3 | C | > | 4 || > | 5 | E | > > #+BEGIN_SRC emacs-lisp :var tt=tt > (length tt) > #+END_SRC > > #+RESULTS: > : 5 > > Best wishes, > Neil > > > On Wed, 18 Sep 2019 at 18:39, Nathan Neff wrote: > >> Hello all, >> >> I have a table like this: >> >> >> | ID | >> || >> | 2 | >> | 3 | >> >> and I want to know how many rows there are w/o the ID heading >> and w/o the horizontal separator. I found the >> org-table-toggle-coordinate-overlays >> which displays an overlay showing the row number: >> >> https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8 >> >> However, the heading is included in the row number (which makes sense). >> >> Is there a way to ignore lines above a heading (or mark a heading in some >> way? >> >> I found a way to add a seq. number by using Calc [1] but I was wondering >> if >> there's a way to tell the org-table-toggle-coordinate-overlays not to >> count the >> heading. >> >> Thanks, >> --Nate >> >> [1] >> >> >> | num | ID | >> |-+| >> | 1 | A | >> | 2 | B | >> | 3 | C | >> | 4 || >> | 5 | E | >> #+TBLFM: $1=vlen(@I..0) >> >> >> https://stackoverflow.com/questions/9267050/how-to-achieve-a-row-index-column-in-emacs-org-mode-using-a-calc-column-rule >> >> >>
[O] Tables: Exclude headings in Row Number?
Hello all, I have a table like this: | ID | || | 2 | | 3 | and I want to know how many rows there are w/o the ID heading and w/o the horizontal separator. I found the org-table-toggle-coordinate-overlays which displays an overlay showing the row number: https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8 However, the heading is included in the row number (which makes sense). Is there a way to ignore lines above a heading (or mark a heading in some way? I found a way to add a seq. number by using Calc [1] but I was wondering if there's a way to tell the org-table-toggle-coordinate-overlays not to count the heading. Thanks, --Nate [1] | num | ID | |-+| | 1 | A | | 2 | B | | 3 | C | | 4 || | 5 | E | #+TBLFM: $1=vlen(@I..0) https://stackoverflow.com/questions/9267050/how-to-achieve-a-row-index-column-in-emacs-org-mode-using-a-calc-column-rule
Re: [O] Move Currently clocked in task to left on modeline
Thanks Nick, Anyone else, I would like to hear how you can keep the currently clocked task in plain site - I use MacOS and Linux, so if there's any OS-specific status software that you recommend let me know. Thanks, --Nate On Mon, Jul 22, 2019 at 6:39 PM Nick Dokos wrote: > Nathan Neff writes: > > > Hello all, > > > > How can I move the currently clocked task to be on the left side > > of my modeline in emacs? > > > > The way the information ends up in the mode line is a bit convoluted: > > - The main variable is `mode-line-format': you should read its doc > string carefully. > > - `mode-line-format' includes the variable `mode-line-misc-info' > towards the end. > > - `mode-line-misc-info' includes the variable `global-mode-string' > (in a somewhat peculiar way that I don't quite understand). > > - `org-clock-in', `org-clock-out' and `org-clock-cancel' affect the > mode line by modifying the `global-mode-string' variable to append > or delete `org-mode-line-string' to/from it and then forcing a > mode-line update with (drum roll) `force-mode-line-update'. > > - The rest of the org mode code mucks around with `org-mode-line-string' > exclusively. > > In short, there is no way to change the position of the currently > clocked task without rewriting code. You might be able to move > *all* of the org information by modifying an earlier mode-line > component (rather than `global-mode-string' which is part of the > final component). But it would not be trivial. > > -- > Nick > > "There are only two hard problems in computer science: cache > invalidation, naming things, and off-by-one errors." -Martin Fowler > > >
[O] Checkbox dependencies - Discern between DONE and CANCELED
Hello all, I have org-enforce-todo-checkbox-dependencies set to t, and I would like to simply mark some tasks as canceled without needing to mess with the checkboxes. I can press C-u C-u C-u C-c C-t which will override dependencies. However, I was wondering if there's a way for org-mode to automatically not enforce checkbox dependencies when canceling a parent task? Thanks, --Nate
Re: [O] Agenda: Display projects and 3 todo subtasks
I ran into another possible solution for the request of seeing the first X TODO tasks for a project in the Agenda: Let's say I simply run an org-tags-todo query looking for :project: The Agenda now shows this: Project1 Project2 Project3 Another possible solution would be to simply TAB to one of the projects, and run org-todo-list with the restriction on the current subtree. I'm trying to find a way to create a function to do this . . . . . . I guess a macro-like function would work Thanks, --Nate On Wed, Jul 31, 2019 at 8:59 AM Sacha Chua wrote: > Hmm, you're right, that project subtask snippet isn't working any more. I > don't think I can sort that out while I'm away from my computer, so it may > take me a few weeks until I can poke around. If anyone happens to have a > better config, please feel free to share! > > On Wed., Jul. 31, 2019, 10:37 Nathan Neff, wrote: > >> I forgot to mention that I have PROJECT tag as not inheritable: >> (setq org-tags-exclude-from-inheritance (quote ("PROJECT"))) >> >> And here's the agenda custom-command addition: >> ("2" "List projects with tasks" my/org-agenda-projects-and-tasks >> "+PROJECT" >> ((org-agenda-max-entries 3)) >> >> >> >> On Tue, Jul 30, 2019 at 9:32 PM Nathan Neff >> wrote: >> >>> Hello all, >>> >>> I found this cool snippet at Sacha Chua's website: [1]. >>> >>> It creates an agenda view with headings marked with tag "project", >>> and for each of those headings, it displays up to 3 sub headings marked >>> TODO. >>> >>> I like this idea of seeing my projects (plus a few TODO entries under >>> each project) >>> in the agenda is a cool idea, so I copy/pasted the snippet at [1]. >>> >>> I created an example org file: >>> * Project 1:PROJECT: >>> ** todo task 1.1 >>> ** todo task 1.2 >>> ** todo task 1.3 >>> ** todo task 1.4 >>> * Project 2:PROJECT: >>> ** todo task 2.1 >>> ** todo task 2.2 >>> ** todo task 2.3 >>> ** todo task 2.4 >>> >>> And ran the custom agenda command on only that file. >>> >>> The output which is produced lists each project correctly. >>> However the sub-tasks under each project are the *same 3 subtasks* >>> from Project 1 >>> >>> foo:Project 1 >>> foo:todo task 1.1 >>> foo:todo task 1.2 >>> foo:todo task 1.3 >>> foo:Project 2 >>> foo:todo task 1.1 >>> foo:todo task 1.2 >>> foo:todo task 1.3 >>> >>> The snippet at [1] is a bit more complex than I thought would be >>> necessary for such >>> an agenda view. Does someone have any snippets or suggestions for how to >>> accomplish the idea above? Is there something obvious that I'm missing >>> about >>> the setup of my test org file? >>> >>> Thanks, >>> --Nate >>> >>> [1] >>> https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#display-projects-with-associated-subtasks >>> The associated blog entry is: >>> >>> https://sachachua.com/blog/2013/01/emacs-org-display-projects-with-a-few-subtasks-in-the-agenda-view/ >>> >>> >>> >>>
Re: [O] Insert subheading at top respect content
On Wed, Aug 21, 2019 at 12:28 AM Carsten Dominik wrote: > Hi Nate, > > What do you mean by passing "the right argument". Which argument do you > want to pass? > I mean the hard-coded 1 on org-next-visible-heading. > > At first, I thought the direct way to fix your function would be > > (defun njn-subheading-respect-content () > (interactive "") > (org-next-visible-heading 1) > (org-insert-heading nil) > ) > > because in your original example, the heading did already have a child. > However, that is not guaranteed, and in the above implementation, the > new heading is created with the level of the next headline, and that > next headline might be a sibling, a child or a parent. So we need to > explicitly set the level: > > (defun njn-subheading-respect-content () > (interactive "") > (let ((level (car (org-heading-components > (org-next-visible-heading 1) > (org-insert-heading nil) > (while (<= (car (org-heading-components)) level) > (org-demote > > I am using (possibly repeated) calls to `org-demote', because this will > do everything correct, also with stuff like org-odd-levels only etc. > > Cool! I tried the above solution and made some modifications: (defun njn-subheading-respect-content () (interactive "") (org-show-children) (let ((level (car (org-heading-components))) ) (outline-next-heading) (org-insert-heading) (while (<= (car (org-heading-components)) level) (org-demote)) )) I added (org-show-children) to work when cursor is on a folded heading. I removed the 1 argument to org-next-visible-heading This appears to do what I want - thanks for the help! > Hope this helps. > > - Carsten > > > > > > On Wed, Aug 21, 2019 at 12:43 AM Nathan Neff > wrote: > >> >> >> On Fri, Aug 16, 2019 at 4:03 AM Carsten Dominik wrote: >> >>> >>> >>> On Fri, Aug 16, 2019 at 10:21 AM Nathan Neff >>> wrote: >>> >>>> Hello all, >>>> >>>> Something that's eluded me all this time has been an >>>> "Insert subheading, after the content, but before other subheadings" >>>> >>>> For example: >>>> If my cursor is anywhere between lines 1 and 4, I would like the >>>> subheading >>>> to be inserted at line 5. >>>> >>>> 1* Heading >>>> :PROPERTIES:... >>>> 2 Some content >>>> 3 More content >>>> 4 >>>> 5** Subheading 1 >>>> 6** Subheading 2 >>>> 7 >>>> I know there's org-insert-subheading and C-u which respects content, but >>>> respect-content will insert a subheading at line 7 in the example >>>> above. I would >>>> like to have a new subheading at line 4. >>>> >>> >>> What about C-c C-n M-RET >>> >> >> Thanks Carsten - I created a function: >> (defun njn-subheading-respect-content () >> (interactive "") >> (org-next-visible-heading 1) >> (org-insert-subheading 't) >> ) >> >> But I'm trying to find out where to get the "correct" arg >> to org-next-visible-heading - I have hard-coded a 1 in the >> above example, but this produces the following subheading: >> >> * Heading <-exec when cursor on this heading >> Some content about Heading >> *** New heading is inserted here (and is the wrong level - should be 2 >> instead of 3) >> ** Sub1 >> ** Sub2 >> >> I will mess with this function a bit and post if I find a solution. >> >> Thanks, >> --Nate >> >>> >>> Carsten >>> >>> >>>> >>>> Thanks, >>>> --Nate >>>> >>>
Re: [O] Insert subheading at top respect content
On Tue, Aug 20, 2019 at 5:42 PM Nathan Neff wrote: > > > On Fri, Aug 16, 2019 at 4:03 AM Carsten Dominik wrote: > >> >> >> On Fri, Aug 16, 2019 at 10:21 AM Nathan Neff >> wrote: >> >>> Hello all, >>> >>> Something that's eluded me all this time has been an >>> "Insert subheading, after the content, but before other subheadings" >>> >>> For example: >>> If my cursor is anywhere between lines 1 and 4, I would like the >>> subheading >>> to be inserted at line 5. >>> >>> 1* Heading >>> :PROPERTIES:... >>> 2 Some content >>> 3 More content >>> 4 >>> 5** Subheading 1 >>> 6** Subheading 2 >>> 7 >>> I know there's org-insert-subheading and C-u which respects content, but >>> respect-content will insert a subheading at line 7 in the example >>> above. I would >>> like to have a new subheading at line 4. >>> >> >> What about C-c C-n M-RET >> > > Thanks Carsten - I created a function: > (defun njn-subheading-respect-content () > (interactive "") > (org-next-visible-heading 1) > (org-insert-subheading 't) > ) > > But I'm trying to find out where to get the "correct" arg > to org-next-visible-heading - I have hard-coded a 1 in the > above example, but this produces the following subheading: > > * Heading <-exec when cursor on this heading > Some content about Heading > *** New heading is inserted here (and is the wrong level - should be 2 > instead of 3) > ** Sub1 > ** Sub2 > > I will mess with this function a bit and post if I find a solution. > > Thanks, > --Nate > >> >> Carsten >> >> >>> >>> Thanks, >>> --Nate >>> >>
Re: [O] Insert subheading at top respect content
On Fri, Aug 16, 2019 at 4:03 AM Carsten Dominik wrote: > > > On Fri, Aug 16, 2019 at 10:21 AM Nathan Neff > wrote: > >> Hello all, >> >> Something that's eluded me all this time has been an >> "Insert subheading, after the content, but before other subheadings" >> >> For example: >> If my cursor is anywhere between lines 1 and 4, I would like the >> subheading >> to be inserted at line 5. >> >> 1* Heading >> :PROPERTIES:... >> 2 Some content >> 3 More content >> 4 >> 5** Subheading 1 >> 6** Subheading 2 >> 7 >> I know there's org-insert-subheading and C-u which respects content, but >> respect-content will insert a subheading at line 7 in the example above. >> I would >> like to have a new subheading at line 4. >> > > What about C-c C-n M-RET > Thanks Carsten - I created a function: (defun njn-subheading-respect-content () (interactive "") (org-next-visible-heading 1) (org-insert-subheading 't) ) But I'm trying to find out where to get the "correct" arg to org-next-visible-heading - I have hard-coded a 1 in the above example, but this produces the following subheading: * Heading <-exec when cursor on this heading Some content about Heading *** New heading is inserted here (and is the wrong level - should be 2 instead of 3) ** Sub1 ** Sub2 I will mess with this function a bit and post if I find a solution. Thanks, --Nate > > Carsten > > >> >> Thanks, >> --Nate >> >
[O] Custom function: Detect agenda mode
Hello all, I would like to map the same key to different functions in evil mode. For example, ",s" should be a shortcut to the schedule command. I'd like to have one function that I would map the command to, which would call either org-schedule or org-agenda-schedule, depending on whether the cursor is in an Agenda view or an org file. What is the "correct" way to do this? Is there some handy functional programming fu that I should know? For example, I wouldn't be surprised to find a function in org-mode already that would do the detection and take the proper action. Thanks, --Nate
[O] Unschedule an item from the date prompt
Hello all, I seem to remember a way to unschedule an item from the date prompt. I found: https://orgmode.org/manual/The-date_002ftime-prompt.html But there's nothing mentioned there. Is there a way to unschedule something other than C-u C-c C-s? Just curious --Nate
[O] Insert subheading at top respect content
Hello all, Something that's eluded me all this time has been an "Insert subheading, after the content, but before other subheadings" For example: If my cursor is anywhere between lines 1 and 4, I would like the subheading to be inserted at line 5. 1* Heading :PROPERTIES:... 2 Some content 3 More content 4 5** Subheading 1 6** Subheading 2 7 I know there's org-insert-subheading and C-u which respects content, but respect-content will insert a subheading at line 7 in the example above. I would like to have a new subheading at line 4. Thanks, --Nate
Re: [O] Open buffers, etc in other window
I just found the term I'm looking for: "advice" -- here's an unrelated example: https://emacs.stackexchange.com/questions/17169/change-order-of-buffers-in-helm-buffers-list On Wed, Aug 14, 2019 at 3:36 PM Nathan Neff wrote: > Hello all, > > There are quite a few commands I run in org-mode to jump to > headlines: org-clock-goto org-capture-goto-last-stored, etc. > > Sometimes, I would prefer that those "jump" commands would use > a new window to perform the jump. > > In my quest to learn Lisp a bit better, I'd like to ask for recommended > way(s) to set some kind of flag "e.g. use-other-window", and "wrap" > the various jump commands with code to switch to the other window (or > create one) > and then call the function. > > For example, something like: > > (def decorator njn-switch-or-create-window() ) > (if use-other-window ( switch or create window)) > (call original function) > ) > > (decorate (org-tags-view, org-clock-goto, org-capture-goto-last-stored > njn-switch-or-create-window > > I *know* Lisp has a bunch of ways of doing this, but I would > like to hear the "best" way to attempt something like this :) > > Thanks, > --Nate > > >
[O] Open buffers, etc in other window
Hello all, There are quite a few commands I run in org-mode to jump to headlines: org-clock-goto org-capture-goto-last-stored, etc. Sometimes, I would prefer that those "jump" commands would use a new window to perform the jump. In my quest to learn Lisp a bit better, I'd like to ask for recommended way(s) to set some kind of flag "e.g. use-other-window", and "wrap" the various jump commands with code to switch to the other window (or create one) and then call the function. For example, something like: (def decorator njn-switch-or-create-window() ) (if use-other-window ( switch or create window)) (call original function) ) (decorate (org-tags-view, org-clock-goto, org-capture-goto-last-stored njn-switch-or-create-window I *know* Lisp has a bunch of ways of doing this, but I would like to hear the "best" way to attempt something like this :) Thanks, --Nate
Re: [O] Helm + Org-mode 9.2.5: Problem with org-set-tags
I think I found the problem and have a fix! Long story short, I modified my helm-completing-read-handlers-alist and added an entry: (add-to-list 'helm-completing-read-handlers-alist `(org-set-tags-command . helm-org-completing-read-tags) ) I have all the gory details here: https://github.com/emacs-helm/helm/issues/2183 Thanks all for your help, hope this helps someone else too :) --Nate On Sat, Aug 10, 2019 at 4:01 PM Nathan Neff wrote: > > > On Sat, Aug 10, 2019 at 3:44 PM Nathan Neff wrote: > >> Hello all, >> >> I created a VM, installed Emacs 26.2 fresh, and installed various versions >> of org-mode using the tar.gz files from https://orgmode.org/ >> >> I replaced org-mode in /usr/share/emacs/26.2/lisp/org with various older >> versions until I found the version of org-mode that breaks the helm tags >> completion. >> >> I found that the latest version of org where the feature works is >> Org-mode version 9.1.9. >> > > Oops - my aplogies - I assumed that the org-versions stopped at 9.1.9. I > tested Org 9.1.14 which (to > my knowledge) is the last of the 9.1.X versions, and Org 9.1.14 works > correctly. > > I tested Org version 9.2 and Org version 9.2 is the version that breaks > the tags functionality > from Helm. > > > >> I will spelunk around in the code to see what might have changed the >> behavior - if anyone has >> suggestions or doesn't have this problem with an older version of org, >> please let me know - it could >> easily be something that I have set incorrectly. >> >> Thanks, >> --Nate >> >> >> >> >> >> >> >> On Fri, Aug 9, 2019 at 4:28 PM Nathan Neff wrote: >> >>> Hello all, >>> >>> I'm hitting this problem with Org-mode 9.2.5: >>> https://groups.google.com/forum/#!topic/emacs-helm/tA6cn6TUdRY >>> >>> Problem synopsis: When I use org-set-tags on a heading >>> with no tags, Helm gives me the correct prompt w/a list of all my tags. >>> After I have entered a single tag, then no more Helm suggestions are >>> offered. This is the bug, and it was fixed at some point. >>> >>> Helm + org-mode *work correctly* when I run emacs using >>> the elpa/helm-20190726/emacs-helm.sh script which comes with Helm >>> for debugging purposes. I notice that the org-version in the *working* >>> example >>> is 9.1.9 (which is, I presume) the stock org-mode that comes with Emacs. >>> >>> I have reproduced this problem on both Linux and OSX. >>> >>> Can anyone suggest a next step to take? >>> >>> Thanks, >>> --Nate >>> >>>
Re: [O] Helm + Org-mode 9.2.5: Problem with org-set-tags
On Sat, Aug 10, 2019 at 3:44 PM Nathan Neff wrote: > Hello all, > > I created a VM, installed Emacs 26.2 fresh, and installed various versions > of org-mode using the tar.gz files from https://orgmode.org/ > > I replaced org-mode in /usr/share/emacs/26.2/lisp/org with various older > versions until I found the version of org-mode that breaks the helm tags > completion. > > I found that the latest version of org where the feature works is Org-mode > version 9.1.9. > Oops - my aplogies - I assumed that the org-versions stopped at 9.1.9. I tested Org 9.1.14 which (to my knowledge) is the last of the 9.1.X versions, and Org 9.1.14 works correctly. I tested Org version 9.2 and Org version 9.2 is the version that breaks the tags functionality from Helm. > I will spelunk around in the code to see what might have changed the > behavior - if anyone has > suggestions or doesn't have this problem with an older version of org, > please let me know - it could > easily be something that I have set incorrectly. > > Thanks, > --Nate > > > > > > > > On Fri, Aug 9, 2019 at 4:28 PM Nathan Neff wrote: > >> Hello all, >> >> I'm hitting this problem with Org-mode 9.2.5: >> https://groups.google.com/forum/#!topic/emacs-helm/tA6cn6TUdRY >> >> Problem synopsis: When I use org-set-tags on a heading >> with no tags, Helm gives me the correct prompt w/a list of all my tags. >> After I have entered a single tag, then no more Helm suggestions are >> offered. This is the bug, and it was fixed at some point. >> >> Helm + org-mode *work correctly* when I run emacs using >> the elpa/helm-20190726/emacs-helm.sh script which comes with Helm >> for debugging purposes. I notice that the org-version in the *working* >> example >> is 9.1.9 (which is, I presume) the stock org-mode that comes with Emacs. >> >> I have reproduced this problem on both Linux and OSX. >> >> Can anyone suggest a next step to take? >> >> Thanks, >> --Nate >> >>
Re: [O] Helm + Org-mode 9.2.5: Problem with org-set-tags
Hello all, I created a VM, installed Emacs 26.2 fresh, and installed various versions of org-mode using the tar.gz files from https://orgmode.org/ I replaced org-mode in /usr/share/emacs/26.2/lisp/org with various older versions until I found the version of org-mode that breaks the helm tags completion. I found that the latest version of org where the feature works is Org-mode version 9.1.9. I will spelunk around in the code to see what might have changed the behavior - if anyone has suggestions or doesn't have this problem with an older version of org, please let me know - it could easily be something that I have set incorrectly. Thanks, --Nate On Fri, Aug 9, 2019 at 4:28 PM Nathan Neff wrote: > Hello all, > > I'm hitting this problem with Org-mode 9.2.5: > https://groups.google.com/forum/#!topic/emacs-helm/tA6cn6TUdRY > > Problem synopsis: When I use org-set-tags on a heading > with no tags, Helm gives me the correct prompt w/a list of all my tags. > After I have entered a single tag, then no more Helm suggestions are > offered. This is the bug, and it was fixed at some point. > > Helm + org-mode *work correctly* when I run emacs using > the elpa/helm-20190726/emacs-helm.sh script which comes with Helm > for debugging purposes. I notice that the org-version in the *working* > example > is 9.1.9 (which is, I presume) the stock org-mode that comes with Emacs. > > I have reproduced this problem on both Linux and OSX. > > Can anyone suggest a next step to take? > > Thanks, > --Nate > >
Re: [O] Helm + Org-mode 9.2.5: Problem with org-set-tags
On Fri, Aug 9, 2019 at 5:15 PM Adam Porter wrote: > Try using the bug-hunter package to isolate the part of your init file > that may be causing the problem. > > Does bug-hunter use d.el and s.el and the other 24 alphabet libraries? :-) I would use bug-hunter, but I'm not convinced the problem is in my own init.el file. I've eliminated everything. It's my stock Emacs package that doesn't work. I removed init.el and I type (require 'helm-config) and (helm-mode 1) and I get the buggy behavior. Thanks, --Nate
[O] Helm + Org-mode 9.2.5: Problem with org-set-tags
Hello all, I'm hitting this problem with Org-mode 9.2.5: https://groups.google.com/forum/#!topic/emacs-helm/tA6cn6TUdRY Problem synopsis: When I use org-set-tags on a heading with no tags, Helm gives me the correct prompt w/a list of all my tags. After I have entered a single tag, then no more Helm suggestions are offered. This is the bug, and it was fixed at some point. Helm + org-mode *work correctly* when I run emacs using the elpa/helm-20190726/emacs-helm.sh script which comes with Helm for debugging purposes. I notice that the org-version in the *working* example is 9.1.9 (which is, I presume) the stock org-mode that comes with Emacs. I have reproduced this problem on both Linux and OSX. Can anyone suggest a next step to take? Thanks, --Nate
Re: [O] Configure Helm Source from org-tags-view
On Fri, Aug 9, 2019 at 2:14 PM Adam Porter wrote: > Nathan Neff writes: > > > I know, but rifle has so many dependencies > > > > Rifle is truly awesome, I just have to convince myself to trust > > f.el and d.el or whatever those one-letter libraries are :-) > > helm-org-rifle's dependencies are libraries which have been around for > over 6 years and are used by many thousands of people. The one-letter > names are because Emacs Lisp has no namespaces, and the convention is to > use package prefixes on all symbols, so long package names make for long > symbol names, which makes programming tedious. > This is good to know - I don't really have any rhyme/reason as to what I use and don't use; For example, I use Helm which isn't part of default Emacs. Thanks again, --Nate
Re: [O] Configure Helm Source from org-tags-view
I know, but rifle has so many dependencies Rifle is truly awesome, I just have to convince myself to trust f.el and d.el or whatever those one-letter libraries are :-) Thanks, --Nate On Fri, Aug 9, 2019 at 6:10 AM Adam Porter wrote: > Nathan Neff writes: > > > Hello all, > > > > Has anyone created a Helm source from the results of org-agenda? > > > > Specifically org-tags-view I think would be a cool Helm source to > > configure where the headings that have certain tags could be displayed > > by Helm. > > > > I looked @ the code for org-tags-view and it's fairly straight forward - > however, I think > > that the function itself is tightly coupled between finding the results > and displaying the > > results. In other words, there's no "easy" function that I see which > would provide headings > > that match a tags search that I could use as a Helm source. > > > > I think I would need to copy quite a bit of code from org-tags-view into > a different > > function to create a Helm source. Am I missing something? > > > > Has anyone else done something similar? > > That's what helm-org-rifle is for. For example, later in the thread you > mentioned searching for a "staff" tag. That would be very easy: > > 1. M-x helm-org-rifle-agenda-files RET (I have it bound to a key). > 2. Type ":staff:". > 3. See results. > > >
Re: [O] Configure Helm Source from org-tags-view
Hi Jean Louis, Thank you for your time and advice - I am trying to spend time learning Elisp and more of the underpinnings in org-mode - so your advice was very helpful. In fact, I found that org-scan-tags is called by org-map-entries - org-map-entries can specify a SCOPE of 'agenda (not the same as the 'agenda that's provided to org-scan tags). So, I got the code down to a one-liner! ;; This searches all agenda-files and returns a bunch of ;; stuff that I can re-use in Helm (org-map-entries 'agenda "bkm" 'agenda) As an aside: When I run this in org-babel, it gives me a table with two cells: | foo:Foo.org :bkm: | inbox: Formatting Strings:bkm:emacs: | Why doesn't this table have two *rows* instead of two *cells*? If anyone knows the fix for this, I'd appreciate it. It probably has something to do with the type of data that's returned by the function, but I'll look into it later. Thanks, --Nate Thanks for your help, --Nate On Thu, Aug 8, 2019 at 3:30 PM Jean Louis wrote: > * Nathan Neff [2019-08-08 22:24]: > > I removed the staff from the beginning of the function call, and changed > > staff to bar I also removed the (or (and)) conditions :-) > > > > Now, I need to see how to make this function search all agenda files - it > > seems > > to work only on the headlines in Foo.org > > I am glad that it works somehow for you. > > I would not like that type of abuse on myself... > > I would just do this: > > M-x helm-occur > > :staff > > and it would be enough. >
Re: [O] Configure Helm Source from org-tags-view
Okay, I got this to work in org-babel in a file foo.org that has headlines like this: * Foo.org :bar: #+BEGIN_SRC emacs-lisp (org-scan-tags 'agenda ;; Action '(lambda (todo tags-list level) ;; Matcher (progn (setq org-cached-props nil) (member "bar" tags-list))) ;; End Matcher org--matcher-tags-todo-only) ;; Todo-only #+END_SRC I removed the "staff" from the beginning of the function call, and changed staff to "bar" I also removed the (or (and)) conditions :-) Now, I need to see how to make this function search all agenda files - it seems to work only on the headlines in Foo.org Thanks, --Nate On Thu, Aug 8, 2019 at 3:03 PM Nathan Neff wrote: > Hi Jean, > > Thank you - however, I can't get this function to return anything. > > org-scan-tags accepts an action, a matcher and a todo-only. > > Code: > > (org-scan-tags 'agenda ;; Action > '(staff lambda (todo tags-list level) ;; Matcher >(progn > (setq org-cached-props nil) > (or (and (member staff tags-list) > ;; End Matcher >org--matcher-tags-todo-only) ;; Todo-only > > * To my knowledge, the 'agenda is the action, and the list starting with > `(staff ) is the matcher. > * Why does the tag I'm searching for ("staff") appear as the first "atom" > in the > "matcher" parameter? Why isn't it just a lambda? > * I don't quite understand what the "or" and "and" are doing. It seems > like > I don't need either of them. > > My org-agenda-files contains files and I have a headline with the tag > "staff" > - no quotes, and the function's not returning anything. > > Thanks, > --Nate > > > On Thu, Aug 8, 2019 at 2:13 PM Jean Louis wrote: > >> * Nathan Neff [2019-08-08 18:50]: >> > Hello all, >> > >> > Has anyone created a Helm source from the results of org-agenda? >> > >> > Specifically org-tags-view I think would be a cool Helm source to >> > configure where the headings that have certain tags could be displayed >> > by Helm. >> > >> > I looked @ the code for org-tags-view and it's fairly straight >> > forward - however, I think that the function itself is tightly >> > coupled between finding the results and displaying the results. In >> > other words, there's no easy function that I see which would provide >> > headings that match a tags search that I could use as a Helm source. >> >> If tag is 'staff, this below will give structure out: >> >> (org-scan-tags 'agenda '(staff lambda (todo tags-list level) (progn >> (setq org-cached-props nil) (or (and (member staff tags-list) >> org--matcher-tags-todo-only) >> >> Now `org-scan-tags` could be inspected if it constructs some lists, >> alist, that are somewhat nicer than such output. >> >> But that output can be converted to HELM completion. >> >> Jean >> >
Re: [O] Configure Helm Source from org-tags-view
Hi Jean, Thank you - however, I can't get this function to return anything. org-scan-tags accepts an action, a matcher and a todo-only. Code: (org-scan-tags 'agenda ;; Action '(staff lambda (todo tags-list level) ;; Matcher (progn (setq org-cached-props nil) (or (and (member staff tags-list) ;; End Matcher org--matcher-tags-todo-only) ;; Todo-only * To my knowledge, the 'agenda is the action, and the list starting with `(staff ) is the matcher. * Why does the tag I'm searching for ("staff") appear as the first "atom" in the "matcher" parameter? Why isn't it just a lambda? * I don't quite understand what the "or" and "and" are doing. It seems like I don't need either of them. My org-agenda-files contains files and I have a headline with the tag "staff" - no quotes, and the function's not returning anything. Thanks, --Nate On Thu, Aug 8, 2019 at 2:13 PM Jean Louis wrote: > * Nathan Neff [2019-08-08 18:50]: > > Hello all, > > > > Has anyone created a Helm source from the results of org-agenda? > > > > Specifically org-tags-view I think would be a cool Helm source to > > configure where the headings that have certain tags could be displayed > > by Helm. > > > > I looked @ the code for org-tags-view and it's fairly straight > > forward - however, I think that the function itself is tightly > > coupled between finding the results and displaying the results. In > > other words, there's no easy function that I see which would provide > > headings that match a tags search that I could use as a Helm source. > > If tag is 'staff, this below will give structure out: > > (org-scan-tags 'agenda '(staff lambda (todo tags-list level) (progn > (setq org-cached-props nil) (or (and (member staff tags-list) > org--matcher-tags-todo-only) > > Now `org-scan-tags` could be inspected if it constructs some lists, > alist, that are somewhat nicer than such output. > > But that output can be converted to HELM completion. > > Jean >
Re: [O] Agenda: Display projects and 3 todo subtasks
Wow - thanks Adam! Your stuff is awesome. org-rifle is incredible. (I just wish that it didn't have as many dependencies -- I guess I'm just a bit paranoid). Thanks, --Nate On Thu, Aug 8, 2019 at 10:48 AM Adam Porter wrote: > Hi Nathan, > > Well, this is an unorthodox solution using org-ql, but it seems to work. > So, for what it's worth: > > #+BEGIN_SRC elisp > (let* ((sub-query (lambda () > (save-excursion > (save-restriction > (cons (org-ql--add-markers > (org-element-headline-parser (line-end-position))) > (-take 3 (progn >(org-narrow-to-subtree) >(org-ql-select nil > '(todo) > :narrow t > :action > 'element-with-markers > (entries (-flatten-n 1 (org-ql-select buffer > '(and (tags "PROJECT") > (not (todo))) > :action sub-query > (org-ql-agenda--agenda nil nil :entries entries)) > #+END_SRC > > This produces an agenda-like view showing (I changed "todo" to "TODO" in > the test file): > > Project 1 > :PROJECT: > TODO task 1.1 > :PROJECT: > TODO task 1.2 > :PROJECT: > TODO task 1.3 > :PROJECT: > Project 2 > :PROJECT: > TODO task 2.1 > :PROJECT: > TODO task 2.2 > :PROJECT: > TODO task 2.3 > :PROJECT: > > This is a bit awkward, but it's given me an idea about running nested > queries, so I'll see if I can make that easier. > > >
[O] Configure Helm Source from org-tags-view
Hello all, Has anyone created a Helm source from the results of org-agenda? Specifically org-tags-view I think would be a cool Helm source to configure where the headings that have certain tags could be displayed by Helm. I looked @ the code for org-tags-view and it's fairly straight forward - however, I think that the function itself is tightly coupled between finding the results and displaying the results. In other words, there's no "easy" function that I see which would provide headings that match a tags search that I could use as a Helm source. I think I would need to copy quite a bit of code from org-tags-view into a different function to create a Helm source. Am I missing something? Has anyone else done something similar? Thanks, --Nate
Re: [O] CUSTOM_ID vs ID
On Sun, Jul 28, 2019 at 3:10 AM Nicolas Goaziou wrote: > Hello, > > Nathan Neff writes: > > > I've often been confused why org-mode has both a CUSTOM_ID > > and a ID property. I mean, why not just use one or the other name? > > Custom ID are user-defined, and only meaningful in the scope of the > document. Also, they may appear as-is when exported, e.g., as an anchor > in HTML. > > ID are (or should be) generated by Org, and are valid across files, > which means they need to be absolutely unique. > > Org keeps track of ID if `org-id-track-globally' is non-nil (the > default). If this is nil, there is almost no difference between ID and > custom ID. > > > When would I ever have both an ID and a CUSTOM_ID property for > > a heading? > > You may want to refer to a heading from anywhere with id:... but need > a clean anchor in HTML export, for example. > > FWIW, I never use ID property. > Hi Nicolas, Ah yes, I remember when I was exporting to HTML and would have both properties. Thank you. Also, I think I will stick with ID purely because I want links which span multiple org mode files. I also plan to learn some more Emacs Lisp to make this link creation thing a bit easier. I know there's been efforts to get org to behave a lot like a Wiki (which I think it already does): https://orgmode.org/worg/org-blog-wiki.html I'd like to mess with Helm and get a custom helm source. org-insert-link can already use Helm, but it could be improved a bit. * Show the IDs (*and* headings :-) of recently created links (because you know, the IDs are hash codes (grumble grumble). Currently Helm just shows the IDs :-( * Show a second Helm list of headings (perhaps all headings in org-mode files) - If heading already has an ID, then simply use that ID. * Provide a context menu, where you can choose to create an ID - Provide a mini buffer to *specify* an ID (evil laugh). Default action will create an ID Thanks, --Nate > > Regards, > > -- > Nicolas Goaziou >
Re: [O] Agenda: Display projects and 3 todo subtasks
Wow, cool to hear from the one & only Sacha! Also, I found this GTD blog which appears to have something similar, under the "Filtering Projects and Actions" section: https://emacs.cafe/emacs/orgmode/gtd/2017/06/30/orgmode-gtd.html However, this mechanism seems to report only the first TODO action which is tagged with "@office" and (I presume) assumes that any headline tagged @office is a "project". Also, after reviewing Bernt Hansen's org-mode setup, it appears that he uses NEXT keyword to distinguish between tasks that need to be done (TODO) and tasks that can be accomplished NEXT. This may obviate the need to show the first X items of any given project. So many options . . . . . . Thanks, --Nate > > > >> On Wed., Jul. 31, 2019, 10:37 Nathan Neff, wrote: >> >>> I forgot to mention that I have PROJECT tag as not inheritable: >>> (setq org-tags-exclude-from-inheritance (quote ("PROJECT"))) >>> >>> And here's the agenda custom-command addition: >>> ("2" "List projects with tasks" my/org-agenda-projects-and-tasks >>> "+PROJECT" >>> ((org-agenda-max-entries 3)) >>> >>> >>> >>> On Tue, Jul 30, 2019 at 9:32 PM Nathan Neff >>> wrote: >>> >>>> Hello all, >>>> >>>> I found this cool snippet at Sacha Chua's website: [1]. >>>> >>>> It creates an agenda view with headings marked with tag "project", >>>> and for each of those headings, it displays up to 3 sub headings marked >>>> TODO. >>>> >>>> I like this idea of seeing my projects (plus a few TODO entries under >>>> each project) >>>> in the agenda is a cool idea, so I copy/pasted the snippet at [1]. >>>> >>>> I created an example org file: >>>> * Project 1:PROJECT: >>>> ** todo task 1.1 >>>> ** todo task 1.2 >>>> ** todo task 1.3 >>>> ** todo task 1.4 >>>> * Project 2:PROJECT: >>>> ** todo task 2.1 >>>> ** todo task 2.2 >>>> ** todo task 2.3 >>>> ** todo task 2.4 >>>> >>>> And ran the custom agenda command on only that file. >>>> >>>> The output which is produced lists each project correctly. >>>> However the sub-tasks under each project are the *same 3 subtasks* >>>> from Project 1 >>>> >>>> foo:Project 1 >>>> foo:todo task 1.1 >>>> foo:todo task 1.2 >>>> foo:todo task 1.3 >>>> foo:Project 2 >>>> foo:todo task 1.1 >>>> foo:todo task 1.2 >>>> foo:todo task 1.3 >>>> >>>> The snippet at [1] is a bit more complex than I thought would be >>>> necessary for such >>>> an agenda view. Does someone have any snippets or suggestions for how >>>> to >>>> accomplish the idea above? Is there something obvious that I'm missing >>>> about >>>> the setup of my test org file? >>>> >>>> Thanks, >>>> --Nate >>>> >>>> [1] >>>> https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#display-projects-with-associated-subtasks >>>> The associated blog entry is: >>>> >>>> https://sachachua.com/blog/2013/01/emacs-org-display-projects-with-a-few-subtasks-in-the-agenda-view/ >>>> >>>> >>>> >>>>
Re: [O] Agenda: Display projects and 3 todo subtasks
I forgot to mention that I have PROJECT tag as not inheritable: (setq org-tags-exclude-from-inheritance (quote ("PROJECT"))) And here's the agenda custom-command addition: ("2" "List projects with tasks" my/org-agenda-projects-and-tasks "+PROJECT" ((org-agenda-max-entries 3)) On Tue, Jul 30, 2019 at 9:32 PM Nathan Neff wrote: > Hello all, > > I found this cool snippet at Sacha Chua's website: [1]. > > It creates an agenda view with headings marked with tag "project", > and for each of those headings, it displays up to 3 sub headings marked > TODO. > > I like this idea of seeing my projects (plus a few TODO entries under each > project) > in the agenda is a cool idea, so I copy/pasted the snippet at [1]. > > I created an example org file: > * Project 1:PROJECT: > ** todo task 1.1 > ** todo task 1.2 > ** todo task 1.3 > ** todo task 1.4 > * Project 2:PROJECT: > ** todo task 2.1 > ** todo task 2.2 > ** todo task 2.3 > ** todo task 2.4 > > And ran the custom agenda command on only that file. > > The output which is produced lists each project correctly. > However the sub-tasks under each project are the *same 3 subtasks* > from Project 1 > > foo:Project 1 > foo:todo task 1.1 > foo:todo task 1.2 > foo:todo task 1.3 > foo:Project 2 > foo:todo task 1.1 > foo:todo task 1.2 > foo:todo task 1.3 > > The snippet at [1] is a bit more complex than I thought would be necessary > for such > an agenda view. Does someone have any snippets or suggestions for how to > accomplish the idea above? Is there something obvious that I'm missing > about > the setup of my test org file? > > Thanks, > --Nate > > [1] > https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#display-projects-with-associated-subtasks > The associated blog entry is: > > https://sachachua.com/blog/2013/01/emacs-org-display-projects-with-a-few-subtasks-in-the-agenda-view/ > > > >
[O] Agenda: Display projects and 3 todo subtasks
Hello all, I found this cool snippet at Sacha Chua's website: [1]. It creates an agenda view with headings marked with tag "project", and for each of those headings, it displays up to 3 sub headings marked TODO. I like this idea of seeing my projects (plus a few TODO entries under each project) in the agenda is a cool idea, so I copy/pasted the snippet at [1]. I created an example org file: * Project 1:PROJECT: ** todo task 1.1 ** todo task 1.2 ** todo task 1.3 ** todo task 1.4 * Project 2:PROJECT: ** todo task 2.1 ** todo task 2.2 ** todo task 2.3 ** todo task 2.4 And ran the custom agenda command on only that file. The output which is produced lists each project correctly. However the sub-tasks under each project are the *same 3 subtasks* from Project 1 foo:Project 1 foo:todo task 1.1 foo:todo task 1.2 foo:todo task 1.3 foo:Project 2 foo:todo task 1.1 foo:todo task 1.2 foo:todo task 1.3 The snippet at [1] is a bit more complex than I thought would be necessary for such an agenda view. Does someone have any snippets or suggestions for how to accomplish the idea above? Is there something obvious that I'm missing about the setup of my test org file? Thanks, --Nate [1] https://github.com/sachac/.emacs.d/blob/gh-pages/Sacha.org#display-projects-with-associated-subtasks The associated blog entry is: https://sachachua.com/blog/2013/01/emacs-org-display-projects-with-a-few-subtasks-in-the-agenda-view/
Re: [O] CUSTOM_ID vs ID
On Sun, Jul 28, 2019 at 3:10 AM Nicolas Goaziou wrote: > Hello, > > Nathan Neff writes: > > > I've often been confused why org-mode has both a CUSTOM_ID > > and a ID property. I mean, why not just use one or the other name? > > Custom ID are user-defined, and only meaningful in the scope of the > document. Also, they may appear as-is when exported, e.g., as an anchor > in HTML. > > ID are (or should be) generated by Org, and are valid across files, > which means they need to be absolutely unique. > I have a lot of org files and one of the main purposes of links is to be able to link to different headings across documents. This seems to imply I should use the ID property. However, I usually *do* manually assign IDs (not CUSTOM_IDs) myself. The reason is so I can reasonably search for the ID within my org files and that the link ID makes some sense to me. For example, if I see a link to "id:keyboard_shortcuts" I can tell where it's going. Later on, if I want to insert a link to my keyboard shortcuts heading in another place in my org files, I can make a guess of the ID I want to link to. So, I guess I'm okay manually assigning ID properties, as long as I don't have conflicts. Thanks for the explanation! Thanks, --Nate > > Org keeps track of ID if `org-id-track-globally' is non-nil (the > default). If this is nil, there is almost no difference between ID and > custom ID. > > > When would I ever have both an ID and a CUSTOM_ID property for > > a heading? > > You may want to refer to a heading from anywhere with id:... but need > a clean anchor in HTML export, for example. > > FWIW, I never use ID property. > > Regards, > > -- > Nicolas Goaziou >
[O] Links in Org-mode : Clunky
Hello all, I've always found that the links in org-mode are basically very clunky to try to use in a quick fashion. To my understanding (see my other question about CUSTOM_ID versus ID) it's a good practice to store either a CUSTOM_ID or ID - (still can't grok the difference) and then store a hyperlink to that CUSTOM_ID or ID. By storing a hyperlink to CUSTOM_ID or ID my heading can change, but this won't matter. I can also move the heading to another file, and links to it will still work. However, I find that it's pretty clunky to store a CUSTOM_ID or ID for a heading, and then copy the link, and then paste it where I want to use it. Granted, it's not very difficult using org-store-link and org-insert-link, but it's just not as easy as I would think it would be. I've recently stumbled on Helm and was wondering if anyone has coded some kind of function that would show me a list of my headings, and create a CUSTOM_ID or ID for the heading and then copy a link to that heading so that I could easily paste it. Let's say I'm typing some stuff and want to insert a link to another heading, I would press some key combo and a helm search would come up. I would find the heading that I want to link to. If the heading has a CUSTOM_ID property, then a link to that CUSTOM_ID would be inserted at the text where my cursor is. If there's not a CUSTOM_ID property perhaps a prompt for a CUSTOM_ID could pop up. Once I enter the CUSTOM_ID, the link is created and copied to my cursor location / clipboard. Has anyone coded such a plugin or am I missing some cool Helm-fu? Thanks, --Nate
[O] CUSTOM_ID vs ID
Hello all, I've often been confused why org-mode has both a CUSTOM_ID and a ID property. I mean, why not just use one or the other name? When would I ever have both an ID and a CUSTOM_ID property for a heading? Thanks, --Nate
Re: [O] Helm + org-set-tags
Boom -- I got it. I used helm's emacs-helm.sh and got to the "minimal" config necessary to run helm. The org-set-tags-command worked correctly when running in the minimal config. I moved some initialization code from my org-mode-config.org file to my init.el file and I got helm to work with org-set-tags-command correctly! init.el (setq package-load-list '((helm-core t) (helm t) (async t) (popup t))) (package-initialize) (require 'helm-config) (helm-mode 1) On Fri, Jul 26, 2019 at 4:47 PM Nathan Neff wrote: > Hello all, > > I would like to use helm to select tags for my headings, > and I'm having a tough time getting something to work. > > I would like the following behavior: > > 1) org-set-tags-command would show a list of all tags > in my agenda files using the helm interface > > 2) I could set one tag for each call to org-set-tags-command. I've > seen posts that want to be able to multi-select tags, but I don't want to > over-complicate things. > > Currently, I'm using helm-core 2019-05-27 and org-mode > 9.2.3 > > I have this set: > ;; Always offer all agenda tags in capture and in normal operations > (setq org-complete-tags-always-offer-all-agenda-tags 't) > > org-set-tags-command works fine if a headline does *not* have a tag. I > get helm > mode with all of the tags from my agenda-files shown. However, after I > assign > a tag to a headline, I no longer see the list of tags when I call > org-set-tags-command. Instead I see: "Tags: :currtag:" prompt and no > suggestions from helm. If I remove the tag, then my > tags show up again in helm, but selecting another tag will then *replace* > the current tag > which is not what I want. > > Any ideas? > > I have removed all #+TAGS: "fast selection" from my org-files. > > I have this code on my machine, but it appears not to be working: > https://github.com/emacs-helm/helm/pull/1439 > > Thanks, > --Nate > >
Re: [O] Show breadcrumbs of nodes in agenda
Also, on my system, the breadcrumb of the headline under the cursor is shown at the bottom of my Emacs: https://www.evernote.com/shard/s226/sh/d9e40d44-0c12-4015-a536-f78ff1840de6/67695bdf33fa3aa8ef91fdf199207f3d I don't know if I had to do anything special to get this. Thanks, --Nate On Fri, Jul 26, 2019 at 9:04 AM Eric Abrahamsen wrote: > Florian Lindner writes: > > > Hello, > > > > the agenda only shows the title of nodes, like: > > > > capture:TODO Task 1 > > > > Often, I have a structure like > > > > * Project A > > ** Task 1 > > > > * Project B > > ** Task 1 > > > > then, I get no idea, from what project the task actually is. > > > > Is there a way to also show the title of the parent in agenda buffer or > even full breadcrumbs? > > You can use %b in the value of `org-agenda-prefix-format'. > > >
[O] Helm + org-set-tags
Hello all, I would like to use helm to select tags for my headings, and I'm having a tough time getting something to work. I would like the following behavior: 1) org-set-tags-command would show a list of all tags in my agenda files using the helm interface 2) I could set one tag for each call to org-set-tags-command. I've seen posts that want to be able to multi-select tags, but I don't want to over-complicate things. Currently, I'm using helm-core 2019-05-27 and org-mode 9.2.3 I have this set: ;; Always offer all agenda tags in capture and in normal operations (setq org-complete-tags-always-offer-all-agenda-tags 't) org-set-tags-command works fine if a headline does *not* have a tag. I get helm mode with all of the tags from my agenda-files shown. However, after I assign a tag to a headline, I no longer see the list of tags when I call org-set-tags-command. Instead I see: "Tags: :currtag:" prompt and no suggestions from helm. If I remove the tag, then my tags show up again in helm, but selecting another tag will then *replace* the current tag which is not what I want. Any ideas? I have removed all #+TAGS: "fast selection" from my org-files. I have this code on my machine, but it appears not to be working: https://github.com/emacs-helm/helm/pull/1439 Thanks, --Nate
[O] Move Currently clocked in task to left on modeline
Hello all, How can I move the currently clocked task to be on the left side of my modeline in emacs? Thanks, --Nate
Re: [O] Agenda: Disable grayed headings having/checkboxes
Thank you - org-agenda-dim-blocked-tasks accomplished what I wanted. On Tue, Jul 9, 2019 at 9:03 PM Matthew Piziak wrote: > > If I were you I'd check the status of variables > `org-enforce-todo-checkbox-dependencies` and > `org-agenda-dim-blocked-tasks`. My > guess is that those checkboxes are blocking the parent heading. > > On Tue, Jul 09, 2019 at 9:31PM Nathan Neff wrote: > > Hello all, > > > > I found that my agenda view will show a scheduled heading as gray if it > > contains > > checkboxes in the body. > > > > Can I disable this? > > > > Thanks, > > --Nate >
[O] Agenda: Disable grayed headings having/checkboxes
Hello all, I found that my agenda view will show a scheduled heading as gray if it contains checkboxes in the body. Can I disable this? Thanks, --Nate
[O] Suggestion for note capture
Hello all, Long time org user and I would like to hear how other people accomplish the capturing of log entries in the context of a currently clocked task. Context: I am clocked into * Task A. I have something about Task A that I want to log. Let's say "Ran into some problem and wasted 30 minutes". I do not want to simply capture this to an "inbox" for later refiling. I don't really want to capture it to a Journal file, either - I know exactly where the note should be (it should IMHO be under the currently clocked item in a subheading "* Log" or in the LOGBOOK drawer of the currently clocked item) - I know there's a capture template (clock) and item to capture a list item to the currently clocked heading - I know there's C-c C-z to capture to the LOGBOOK drawer of the heading that my cursor is on. - I know there's a way to jump to the currently clocked item, so I could jump to the currently clocked item, press C-c C-z and then try to use C-c & to jump back - however I can't get C-c & to jump back. - This request also seems like it should be possible using a capture template, but I can't figure out how. - I would like to combine the two destinations and capture an item with an inactive timestamp to the LOGBOOK entry of the currently clocked item - Optimally, I would like the text of the log entry to show up in the agenda (but that's a tall order, and I'm okay with seeing the headline which the LOGBOOK entry resides under. - Can I capture to a subheading of the currently clocked item? I've tried this using (clock) and headline in the capture template, but the capture template keeps adding new "* Log" subheadings. Any suggestions? Or, is this request something that should / could be done a different logical way? Thanks, --Nate
[O] Viewing all logbook entries between time/date
Hello all, I found this request on reddit [1] and wanted to see if there's any update to org-mode that would fit the request. In short, the request is for an "agenda" view or some other kind of consolidated view of all log messages that have inactive timestamps between and . Currently, the agenda mode allows me to view logbook entries, but logbook entries made using org-agenda-add-note or org-add-note will not show up in the agenda view. Thanks for any pointers! --Nate [1] https://www.reddit.com/r/emacs/comments/5x7eit/orgmode_how_can_notes_and_other_logbook_entries/
Re: [O] Agenda search: setting sort-order
On Tue, Jun 19, 2018 at 3:20 PM, Nicolas Goaziou wrote: > Hello, > > Nathan Neff writes: > > > I had a look at org-agenda.el, and took a first stab at "coding" :) > > I fixed the sorting problem when using agenda-search-view, and > > I have a DIFF/patch at the bottom of this e-mail [1] that provided the > fix. > > > > Would this be of interest to the org-mode project? > > IMO, the Org mode project is interested in having its bugs fixed ;) > > > This code fixes the > > problem, > > but it is duplicated in the function org-agenda-get-todos, and seems > > redundant, > > therefore a more "long term" fix would probably not resemble the minor > patch > > below. Also, I have no experience with lisp, nor the org-mode > > codebase :-O > > A more "long term" fix would be to rewrite the agenda (asynchronous, > more scalable, better API for external use). > > > Here's steps I used to find the problem. Feel free to skip to [1] > > for the DIFF/patch. > > Would you mind sending it using `git format-patch'? > Hi Nicolas, I'm a bit leery of submitting these lines of code - one reason is that the sort feature still really doesn't work very well. IIRC, the results are globally sorted by timestamp, but there's results with NULL or no timestamps mixed in. In other words, results are something like: * foo 12/1/2001 * bar 12/2/2002 * baz * blech 12/2/2003 * another So, it's not really a fix, and I'm not sure this is even good code :) If someone wants to grab the fix and jump from here, that's fine, it's only a few lines. Thanks, --Nate > > Thank you. > > Regards, > > -- > Nicolas Goaziou >
Re: [O] Agenda search: setting sort-order
I had a look at org-agenda.el, and took a first stab at "coding" :) I fixed the sorting problem when using agenda-search-view, and I have a DIFF/patch at the bottom of this e-mail [1] that provided the fix. Would this be of interest to the org-mode project? This code fixes the problem, but it is duplicated in the function org-agenda-get-todos, and seems redundant, therefore a more "long term" fix would probably not resemble the minor patch below. Also, I have no experience with lisp, nor the org-mode codebase :-O Here's steps I used to find the problem. Feel free to skip to [1] for the DIFF/patch. I found that if I perform an agenda-search, and change the sort method to priority or tag, then the agenda items matching my search are indeed sorted in the correct order. This lead me to think to inspect the code that is performing the time/date comparison of entries found by the org-search-view. I put a debug-watch on the function org-cmp-ts and set the sort method to "ts-down". I ran an agenda search, and I noticed that none of the entries matching my search had a 'ts-date property. I ran another agenda search (by tag) and noticed that the entries being compared in the org-cmp-ts function did indeed have a 'ts-date property. So, I came to the conclusion that org-search-view does not give matching entries a 'ts-date property. Also, the 'type property of these entries needed the ts-date-type appended to their 'type property (e.g. "search timestamp" instead of just "search"). Otherwise, the org-cmp-ts function would think the two entries it was comparing did not have matching timestamp types and simply return nil, indicating both entries were "equal" in sort order. Thanks, --Nate [1] I ran a DIFF of org-agenda.el (mine) against org-agenda.el (9.1.13) and here's the DIFF. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 322480c..5af6743 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4567,6 +4567,9 @@ is active." (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) + ts-date-pair (org-agenda-entry-get-agenda-timestamp (point)) + ts-date (car ts-date-pair) + ts-date-type (cdr ts-date-pair) level (make-string (org-reduced-level (org-outline-level)) ? ) inherited-tags (or (eq org-agenda-show-inherited-tags 'always) @@ -4584,10 +4587,12 @@ is active." (org-add-props txt props 'org-marker marker 'org-hd-marker marker 'org-todo-regexp org-todo-regexp + 'ts-date ts-date + 'ts-date-type ts-date-type 'level level 'org-complex-heading-regexp org-complex-heading-regexp 'priority 1000 - 'type "search") + 'type (concat "search" ts-date-type)) (push txt ee) (goto-char (1- end)) (setq rtn (nreverse ee)) On Tue, Jun 12, 2018 at 3:07 PM, Nathan Neff wrote: > Bumping this question to see if anyone has a workaround - > I recently have been wishing to search for keywords and order > the results in reverse timestamp order. > > This sounds like a fairly useful and common feature, so I think > there must be something I'm configuring incorrectly. I am able > to reproduce the problem using a fairly clean Emacs install (a > VM with no customizations). > > Thanks, > --Nate > > > > On Wed, May 30, 2018 at 4:57 PM, Nathan Neff > wrote: > >> Hi all, >> >> I'm using org-mode version 9.1.13 from elpa, and >> have a custom agenda command: >> >> >> (setq org-agenda-custom-commands >>'( >> ("z" search "" >>((org-agenda-sorting-strategy '(timestamp-up)) >> >> And I have an org-file with this data: >> >> * TODO [#C] Test1 >> :foo: >> <2018-04-24 Tue 19:30> >> * TODO [#A] Test2 >> :foo: >> <2018-05-24 Thu 19:30> >> * TODO [#B] Test3 >> :foo: >> <2017-12-24 Sun 23:33> >> >> The data is not sorted according to timestamp. I cannot seem to >> get the data sorted in any fashion when using the "search" agenda mode. >> >> However, if I change "search" to "tags" and search for the "foo" tag, then >> it appears that the sorting works. I've tested it with priority and >> timestamp >> using the above data and it sorts the items correctly. >> >> Why is my "search" agenda command ignoring the >> org-agenda-sorting-strategy? >> >> Thanks, >> --Nate >> > >
Re: [O] Agenda search: setting sort-order
Bumping this question to see if anyone has a workaround - I recently have been wishing to search for keywords and order the results in reverse timestamp order. This sounds like a fairly useful and common feature, so I think there must be something I'm configuring incorrectly. I am able to reproduce the problem using a fairly clean Emacs install (a VM with no customizations). Thanks, --Nate On Wed, May 30, 2018 at 4:57 PM, Nathan Neff wrote: > Hi all, > > I'm using org-mode version 9.1.13 from elpa, and > have a custom agenda command: > > > (setq org-agenda-custom-commands >'( > ("z" search "" >((org-agenda-sorting-strategy '(timestamp-up)) > > And I have an org-file with this data: > > * TODO [#C] Test1 > :foo: > <2018-04-24 Tue 19:30> > * TODO [#A] Test2 > :foo: > <2018-05-24 Thu 19:30> > * TODO [#B] Test3 > :foo: > <2017-12-24 Sun 23:33> > > The data is not sorted according to timestamp. I cannot seem to > get the data sorted in any fashion when using the "search" agenda mode. > > However, if I change "search" to "tags" and search for the "foo" tag, then > it appears that the sorting works. I've tested it with priority and > timestamp > using the above data and it sorts the items correctly. > > Why is my "search" agenda command ignoring the org-agenda-sorting-strategy? > > Thanks, > --Nate >
[O] Agenda search: setting sort-order
Hi all, I'm using org-mode version 9.1.13 from elpa, and have a custom agenda command: (setq org-agenda-custom-commands '( ("z" search "" ((org-agenda-sorting-strategy '(timestamp-up)) And I have an org-file with this data: * TODO [#C] Test1 :foo: <2018-04-24 Tue 19:30> * TODO [#A] Test2 :foo: <2018-05-24 Thu 19:30> * TODO [#B] Test3 :foo: <2017-12-24 Sun 23:33> The data is not sorted according to timestamp. I cannot seem to get the data sorted in any fashion when using the "search" agenda mode. However, if I change "search" to "tags" and search for the "foo" tag, then it appears that the sorting works. I've tested it with priority and timestamp using the above data and it sorts the items correctly. Why is my "search" agenda command ignoring the org-agenda-sorting-strategy? Thanks, --Nate
[O] "Contexts"?
Hi, I'd like to know if there's a way to tell Emacs or org-mode to be in a certain context, where a certain directory is "home" depending on what context I'm working in currently. For example, if I'm giving a presentation, I would like org-mode/Emacs/ido-mode to have ~/presentation as a base/starting directory and only show files from there when I switch files using Ido (I have files named according to customers, etc, and don't want those to appear when I'm giving a presentation). I realize this is more of an Emacs question, but what do other people do to have perhaps a "work" mode for Emacs and a "personal" mode for Emacs? Thanks, --Nate
[O] Had to require org-capture?
Hello, I'm running org-mode from the non-compiled source code and the latest git pull. I noticed that calling org-capture was not working correctly, so I ran (require 'org-capture), then it worked. Is this something new? I can post version, setup, etc. later, but I just wanted to know if I'm missing some vital setup/cofiguration information. Thanks, --Nate
Re: [O] OSX to PDF: Minimal Install
On Fri, Nov 2, 2012 at 2:41 PM, Jambunathan K wrote: > Nathan Neff writes: > >> Hello, >> >> I'd like to convert org-mode documents to PDF using the exporter, >> on OSX, but it appears that I'd have to download MacTex which is a 2GB >> download. Is there anything smaller that I could download in order to >> be able to >> export org documents to PDF? > > Install LibreOffice and follow instructions in this thread: > > http://lists.gnu.org/archive/html/emacs-orgmode/2012-09/msg00027.html Hello Jambunathan, I like this solution the best, as I already have LibreOffice installed. However, I am having trouble following the instructions in that thread. I cannot even get a simple .org file to export using the C-c C-e o command -- I get the error message "Symbol's value as variable is void: err". I have LibreOffice installed (on OSX) in /Applications/LibreOffice. Some additional information from Emacs/org-mode/org-odt is here: OVERVIEW [2 times] Export buffer: Debug (org-odt): Searching for OpenDocument schema files... Debug (org-odt): Trying /usr/share/emacs/etc/org/schema/... Debug (org-odt): Using schema files under /usr/share/emacs/etc/org/schema/ Debug (org-odt): Searching for OpenDocument styles files... Debug (org-odt): Trying /usr/share/emacs/etc/org/styles/... Debug (org-odt): Using styles under /usr/share/emacs/etc/org/styles/ call-interactively: Symbol's value as variable is void: err Export buffer: call-interactively: Symbol's value as variable is void: err I am using org-odt.el version 24.1 and org-mode version 7.8.11 (release_7.8.11-723-g0f3b6 I suspected that "soffice" was not in Emacs' path, so I added /Applications/LibreOffice/Contents/MacOS to the path, but to no avail. Any help would be appreciated! Thanks, --Nate > >> >> Thanks, >> --Nate >> >> > > --
[O] OSX to PDF: Minimal Install
Hello, I'd like to convert org-mode documents to PDF using the exporter, on OSX, but it appears that I'd have to download MacTex which is a 2GB download. Is there anything smaller that I could download in order to be able to export org documents to PDF? Thanks, --Nate
[O] Use default value if a variable is not defined
Hello, I'm trying to create a function that will tell org-capture dynamically where to put the captured item. I have it almost working -- where I'm getting hung up on is with basic Emacs lisp. I want to basically implement this pseudo code: IF I have defined a variable called njn/current-q-file then (find-file njn/current-q-file) ELSE (find-file ("questions.org"))) However, if I do not define my njn/current-q-file then I get a "Symbol's value as variable is void" error when Emacs starts up. How do I test for the existence (and non-nil ness of a variable in Emacs) Thanks, --Nate
[O] Keyboard command to force "done"
Hello, I'd like to create a keyboard shortcut to set a TODO state to "done" and ignore any dependencies/blocking (like todo items in subheadings, or checkboxes). >From the documentation for (org-todo) I see that I need to specify the argument prefix of C-u C-u C-u I have other keyboard shortcuts that do this also, but I can't successfully call org-todo with a "done" argument. Can anyone correct this function to be able to specify "done" as an argument to 'org-todo? (defun njn/force-done () (interactive) (setq current-prefix-arg '(64)) ; specify universal argument as C-u C-u C-u (4*4*4) (call-interactively 'org-todo)) ; don't know the syntax to pass 'done to 'org-todo ) Thanks, --Nate
[O] Show more text in Follow mode or Tabbing after search?
Currently, I do an Agenda search, then I get a list of result headlines back. I know there's a "Show Context" feature but this is rather noisy. I like the "Follow" mode feature, but is there a way to show more context around the text that's shown in the Follow mode? For example, I have window 1 and window 2 after doing a search Search "baz" Search Results * foo <--cursor here * bar * baz Window Opened in "F" ollow mode or pressing Tab - * foo * bar * baz Is there a way to show more context in the search results? Possibly highlighting the search term? I know I can press "Tab", then press Tab again to open the headline that was found, but this is many keypresses just to try to find the text that you searched for in the first place. Thanks, --Nate