Re: [O] Insert git hash into exported document
On Friday, 23 Dec 2016 at 17:34, David Talmage wrote: > I'd like to insert the git hash of HEAD in the org-mode documents that > I export. Is there an easy way? I'm exporting to LaTeX. Anything you can do in a shell could be exported to LaTeX. E.g. I do the following with mercurial in one of my documents: #+begin_src org ,* Recent change history ,#+name: changehistoryshellblock ,#+begin_src shell :exports results :results output hg log --template "{date|shortdate} {desc|firstline}\n" --limit 10 fresa.org ,#+end_src #+end_src HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de signature.asc Description: PGP signature
[O] Literate config and :tangle clauses
Hi all! Recently I've experienced a kind of a problem - my literate Emacs config stopped tangling correctly, only a subset of code blocks were found in resulting .el file. I've looked at it a bit closer and it seems now (not earlier than 9.0.2) the :tangle clause became required. I've searched Org repo but failed to find a respective commit or any reference to the relevant info. Can anyone point me to the right direction? regards, Alex signature.asc Description: PGP signature
Re: [O] show only top level TODO in agenda and ignore sub level TODOS in agenda?
On Thursday, 22 Dec 2016 at 13:01, Xebar Saram wrote: > Hi all > > i recently had some projects where i would define the overall project > as a TODO and then add some more sub headers with TODOS. the problem > is that i dont want to see all these sub TODOS in the agenda. For > example: > > * TODO start writing paper > ** TODO collect data > ** TODO add refernces [...] > is there a property drawer/other trick to achieve this? I don't know but I can suggest using checkboxes for this? info:(org) Checkboxes They work well and are appropriate for when you have sub-tasks for a single task. -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de signature.asc Description: PGP signature
Re: [O] Insert git hash into exported document
David Talmage writes: > I'd like to insert the git hash of HEAD in the org-mode documents that I > export. Is there an easy way? I'm exporting to LaTeX. [] Hello, maybe you can start with a simple: #+NAME: hash-from-lisp #+BEGIN_SRC emacs-lisp (shell-command-to-string "git rev-parse HEAD" ) #+END_SRC #+RESULTS: hash-from-lisp : 099b6ceee7264832b8e13f1156974b8017e6e4bb You can hide the result using proper headers or the noexport tag and then print the result in a verbose way: The latest commit hash is src_emacs-lisp[:var i=hash-from-lisp]{(format "%s" i)} or if you enable the shell in babel you can start with: #+NAME: hash-from-shell #+BEGIN_SRC shell git rev-parse HEAD #+END_SRC For latex only, I use the following snippets. This works with gitinfo2 (in debian you need the packages texlive-latex-extra and texlive-latex-extra-doc). Sorry for the long lines... Please note that this will also highlight the dirty status of the repo, since adding the latest hash for a modified version make little sense. Best, Daniele #+LATEX_HEADER: \usepackage[,missing={Unknown},dirty={-- Uncommited Changes!!!},notags={Unknown},mark]{gitinfo2} #+LATEX: \renewcommand{\gitMarkPref}{Historical Info} # NOTE: \gitTags does not work well: it adds a traling ")" # NOTE: \gitReln takes the latest release, even there are more commits #+LATEX: \renewcommand{\gitMark}{Version:\space{}\gitTags{}\space{}--\space{}Id::\space{}\gitAbbrevHash\space{}--\space{}Date:\space{}\gitAuthorIsoDate\space{}\gitDirty} #+BEGIN_SRC emacs-lisp (defun update-gitinfo (backend) "Update .git/gitHeadInfo.gin" (message "Command: %s" (shell-command-to-string "cd `git rev-parse --show-toplevel` && /bin/bash /usr/share/doc/texlive-doc/latex/gitinfo2/post-xxx-sample.txt")) (message "Updated gitinfo")) (add-hook 'org-export-before-processing-hook #'update-gitinfo) #+END_SRC
Re: [O] Proper git settings to stay with master?
On Fri, Dec 23, 2016 at 5:24 AM, Achim Gratz wrote: > Am 22.12.2016 um 17:44 schrieb John Hendy: >> >> $ git pull >> From http://orgmode.org/org-mode >>13751c3249..820d1eb617 maint -> origin/maint >>7fd61c4f92..1c89082600 master -> origin/master >> You are not currently on a branch. > > > Well, then you want to do a > > git checkout master Sure... I get that that I *can* do that. I just wondered why I *needed* to do that. > > or > > git checkout maint > > depending on which branch you want to be on. > >> Have I botched something? If so, what would be the method to remedy? >> If not, what should be updated in the instructions regarding sticking >> with master? I see references on how to specify maint, but that seems >> to imply that master is the default and action is only required to >> override to use maint branch. > > > Master _is_ the default, so you must have specifically checked out a commit > not at the branch HEAD or left a bisect or similar command that replays > history hanging unfinished somewhere. > This makes sense. I don't know why this never happened before, but checking out a specific commit makes sense. Perhaps I was bisecting something in the past and checking out various commits? Once you check out *something*, do you always have to re-checkout something else to undo this effect (and make it like the default)? As in if I check out a commit and then =git pull=, it won't go back to master? Thanks for clarifying/educating! John > -- > Achim. > > (on the road :-) > >
Re: [O] show only top level TODO in agenda and ignore sub level TODOS in agenda?
Thx stig. while thats an option i would prefer to keep the actual TODOS and not use lists for this best z On Thu, Dec 22, 2016 at 3:15 PM, Stig Brautaset wrote: > > > Sent from my iPhone > > > On 22 Dec 2016, at 13:01, Xebar Saram wrote: > > > > Hi all > > > > i recently had some projects where i would define the overall project as > a TODO and then add some more sub headers with TODOS. the problem is that i > dont want to see all these sub TODOS in the agenda. For example: > > > > * TODO start writing paper > > ** TODO collect data > > ** TODO add refernces > > ... > > > > i would like only the * TODO start writing paper to show in the Agenda > view. > > > > obviously i dont want it to happen in any header-sub header in all files > but rather for specific headers. > > > > is there a property drawer/other trick to achieve this? > > You could perhaps use checklists instead of TODOS for the "inner" ones? > > - [ ] some actionable thing > > If you put [/] on the immediate parent heading (your todo) then the todo > will be updated with [4/6] once you action four out of 6 items. > > Stig
[O] Insert git hash into exported document
I'd like to insert the git hash of HEAD in the org-mode documents that I export. Is there an easy way? I'm exporting to LaTeX. I looked for it on worg. The mailing list on gmane.org is still off-line, alas.
Re: [O] how to convert/normalize plain footnotes into [fn:] ones
Hi Nicolas, thanks again! On Mi, Dez 21 2016, Nicolas Goaziou wrote: > I would use (and, in fact, used) > > \\[\\([0-9]+\\)\\] --> \\[fn:\\1\\] > > and eyeballing the results. That works quite well; but as I'm trying to convert a whole book I also have lots of "\cite[NUMBER]{my_ref}" commands from TeX; and these all give false positives with the regex above. Actually I couldn't figure out what a regex would have to look like that excludes occurences of the mentioned expression if they are preceded by "cite". >> The problem unfortunately arises also by pandoc still using the now >> obsolete syntax of plain footnotes when converting (e.g. latex) to org >> mode! > > I'm certain Pandoc importer will ultimately catch-up. Yes, I posted the problem on the pandoc mailing list and Albert Krewinkel kindly fixed it immediately and pushed the code to the dev version of pandoc: https://github.com/jgm/pandoc/commit/d27188ad309feb9a76f6dc3d816ad78722078fe1 I checked out the haskell source, compiled it and it works perfectly now! The org writer produces the correct footnote format. Gerald.
Re: [O] Proper git settings to stay with master?
Am 22.12.2016 um 17:44 schrieb John Hendy: $ git pull From http://orgmode.org/org-mode 13751c3249..820d1eb617 maint -> origin/maint 7fd61c4f92..1c89082600 master -> origin/master You are not currently on a branch. Well, then you want to do a git checkout master or git checkout maint depending on which branch you want to be on. Have I botched something? If so, what would be the method to remedy? If not, what should be updated in the instructions regarding sticking with master? I see references on how to specify maint, but that seems to imply that master is the default and action is only required to override to use maint branch. Master _is_ the default, so you must have specifically checked out a commit not at the branch HEAD or left a bisect or similar command that replays history hanging unfinished somewhere. -- Achim. (on the road :-)