Gustav Wikström Gustav

Gustav pushed to master at bzg/org-mode

  • 8e3b73d4dc Allow storing and following ID links before first heading * lisp/org.el (org-find-property): Make org-find-property work correctly also before first heading. * lisp/org-id.el (org-id-store-link): Make it possible to store ID links also before first heading.

6 months ago

Gustav pushed to master at bzg/org-mode

  • a24c8c481f Refactor attachment path expansion * lisp/org-attach.el (org-attach-link-expand): New function for link element expansion. * lisp/org-element.el (org-element-link-parser): Remove info about expanded attachment paths from link elements. * lisp/ol.el (org-link-open) * lisp/ox-texinfo.el (org-texinfo-link) * lisp/ox-odt.el (org-odt-link) * lisp/ox-md.el (org-md-link) * lisp/ox-man.el (org-man-link) * lisp/ox-latex.el (org-latex--inline-image, org-latex-link) * lisp/ox-html.el (org-html-link) * lisp/ox-ascii.el (org-ascii-link): Refactor to use new link expansion function from org-attach.el instead of (now removed) custom link property from org-element.el.

8 months ago

Gustav pushed to master at bzg/org-mode

  • 7cf58a55da Document org-attach-commands option * doc/org-manual.org (Attachment options): Mention org-attach-commands in the manual next to all other options for the attachment functionality.
  • edefb2835d Additional option for org-attach-store-link-p * doc/org-manual.org (Attachment options) * etc/ORG-NEWS (New option in ~org-attach-store-link-p~) * lisp/org-attach.el (org-attach-store-link-p) (org-attach-attach): Add option to store a link to the attached file with a file link.
  • f0ce4a6357 org-attach: variable name change * lisp/org-attach.el (org-attach-attach): Change variable name only for the point of better semantics
  • View comparison for these 3 commits »

9 months ago

Gustav pushed to master at bzg/org-mode

  • a632873ad9 Mention the new contextual property set for attachment links * lisp/org-element.el (org-element-link-parser): Mention :attachment-path in docstring.

9 months ago

Gustav pushed to master at bzg/org-mode

  • 52fafd3005 Fix backtick in org-odt-inline-image-rules * lisp/ox-odt.el (org-odt-inline-image-rules): Fix error to make the list evaluate inline code at definition.
  • 20d293b4aa Give link parser knowledge of attachment link expanded path * lisp/org-element.el (org-element-link-parser): Add info about expanded attachment paths to the link parse tree export. * lisp/org-attach.el Remove org-attach-open-link. Let attachment links use the built in code that already is developed for file links. * lisp/ol.el (org-link-open): Add knowledge about attachment links to the function opening links, so they can be opened exactly as file links are opened. * lisp/ox-texinfo.el (org-texinfo-link) * lisp/ox-odt.el (org-odt-link) * lisp/ox-md.el (org-md-link) * lisp/ox-man.el (org-man-link) * lisp/ox-latex.el (org-latex--inline-image, org-latex-link) * lisp/ox-html.el (org-html-link) * lisp/ox-ascii.el (org-ascii-link): Refactor to use property from link parser instead of invoking attachment expansion in the exporter.
  • View comparison for these 2 commits »

9 months ago

Gustav pushed to master at bzg/org-mode

  • f93020d5e6 Expand attachment links with point in correct place * lisp/ox-texinfo.el (org-texinfo-link) * lisp/ox-odt.el (org-odt-link) * lisp/ox-md.el (org-md-link) * lisp/ox-man.el (org-man-link) * lisp/ox-latex.el (org-latex--inline-image, org-latex-link) * lisp/ox-html.el (org-html-link) * lisp/ox-ascii.el (org-ascii-link): Move point to the link for org-attach-expand to know from which headline to expand the link.

9 months ago

Gustav pushed to master at bzg/org-mode

  • 0ac6a9e1fc Further fix of exporting attachment links in export backends * lisp/ox-html.el (org-html-link, org-html-inline-image-rules) * lisp/ox-odt.el (org-odt-inline-image-rules) * lisp/ox-texinfo.el (org-texinfo-link) (org-texinfo-inline-image-rules): Make attachment links consistently expand as relative to file and add attachment link type to image rules for consistency among export backends.

9 months ago

Gustav pushed to master at bzg/org-mode

  • d70db54dbc Improve attachment link export functionality Make attachment links export just as file links. * lisp/ox-ascii.el * lisp/ox-html.el * lisp/ox-latex.el * lisp/ox-man.el * lisp/ox-md.el * lisp/ox-texinfo.el * lisp/org-attach.el: Move export functionality for attachment links into the respective export backend, for feature parity with file links.
  • 32aa7139fd Markdown exporter: restructure org-md-link * lisp/ox-md.el (org-md-link): Restructure slightly to match the code structure of other exporters. For easier later refactor.
  • View comparison for these 2 commits »

9 months ago

Gustav pushed to master at bzg/org-mode

  • 26ace90042 Make org-attach store links using attachment-links * lisp/org-attach.el (org-attach-attach): Storing links using the new attachment link type instead of file links. * lisp/org-compat.el (org-attach-store-link, org-attach-expand-link): Remove not needed functions and mark them as obsolete for easier future reference.

10 months ago

Gustav pushed to next at bzg/org-mode

  • 03c60c78b5 Docstring update * lisp/org.el (org-archive-location): Update docstring due to the addition of document property drawers.

11 months ago

Gustav pushed to next at bzg/org-mode

  • 00646ad817 Fix newline-issue with document property drawer A bug was squashed where newlines after insertion of document property drawers wasn't handled correctly. * testing/lisp/test-org.el (test-org/insert-property-drawer): Add test to verify that the document property drawer is inserted above keyword lines. Also fix the specification for document property drawer so it doesn't remove existing blank rows if inserted at the top of a buffer. * lisp/org.el (org-insert-property-drawer): Make sure to add newline after document property drawers.

11 months ago

Gustav pushed to master at bzg/org-mode

  • 58ceff522b Handle attachment links more gracefully when expanding inline images * lisp/org.el (org-display-inline-images): Introduce error-handling to ignore image display if the attachment link cannot be expanded for whatever reason. For example if attachments are relative to the buffer, but the buffer is temporary and lacks filesystem location.

1 year ago

Gustav pushed to next at bzg/org-mode

  • cffe44ba94 Merge branch 'master' into next
  • 42b8db0d34 Improve handling of org attach id to path functions * doc/org-manual.org (Attachment options) * etc/ORG-NEWS (Org-Attach has been refactored and extended) (New ID method based on timestamp) * lisp/org-attach.el (org-attach-id-uuid-folder-format) (org-attach-id-ts-folder-format) (org-attach-id-to-path-function-list, org-attach-dir) (org-attach-dir-from-id): Better handling of id to path functionality. At the same time adding an id-to-path function for timestamp-based ID that easily can be promoted to the primary function by customization of the user.
  • View comparison for these 2 commits »

1 year ago

Gustav pushed to master at bzg/org-mode

  • 42b8db0d34 Improve handling of org attach id to path functions * doc/org-manual.org (Attachment options) * etc/ORG-NEWS (Org-Attach has been refactored and extended) (New ID method based on timestamp) * lisp/org-attach.el (org-attach-id-uuid-folder-format) (org-attach-id-ts-folder-format) (org-attach-id-to-path-function-list, org-attach-dir) (org-attach-dir-from-id): Better handling of id to path functionality. At the same time adding an id-to-path function for timestamp-based ID that easily can be promoted to the primary function by customization of the user.

1 year ago

Gustav pushed to next at bzg/org-mode

  • 1bdff9f73d Org document property-drawers Add functionality to define property-blocks on document level, in addition to at headline level. * doc/org-manual.org: * etc/ORG-NEWS: Document new functionality. * lisp/org.el (org-keyword-regexp): Define constant instead of hardcoding. (org-file-properties): Renamed, see next line. (org-keyword-properties): Renamed from above. Due to the fact that properties can be defined for the whole document using property drawers this local variable needs a rename to make its name less ambigous. (org-refresh-properties, org-refresh-property, org-entry-properties) (org-refresh-category-properties, org-get-property-block) (org-entry-get-with-inheritance, org-entry-put) (org-insert-property-drawer, org-end-of-subtree): Made to work before first headline. (org-at-property-block-p): New function to validate if point is at the start of a property block. (org-property-global-value): Renamed, see next line. (org-property-global-or-keyword-value): Renamed from above to match its functionality better. (org-back-to-heading-or-point-min): New function to make a document work as a level 0 node in the outline. (org-at-keyword-p): Predicate function to answer to if we're currently at a keyword line or not. (org-up-heading-or-point-min): New function to make a document work as a level 0 node in the outline. * lisp/org-element.el (org-element--current-element): Can now detect property-blocks before first headline according to it's positional rules. * lisp/org-attach.el (org-attach): Make it possible to call the attachment dispatcher also before the first headline, since document property drawers make attachments possible for the whole document now. * lisp/org-capture.el: Modified only due to rename of function in org.el. * lisp/org-compat.el (org-file-properties) (org-property-global-value): Renamed functions declared obsolete. * testing/lisp/test-org.el (org/insert-property-drawer) (org/set-property, org/delete-property, org/delete-property-globally): Additions of tests to check if they work before first headline. (org/at-property-p, org/at-property-block-p, org/get-property-block) (org/entry-get, org/refresh-properties): New tests * testing/examples/property-inheritance.org: Switch from property-keywords to a property-drawer in the testfile. Functionality should be the same, but now using a document drawer instead of property-keywords. Reason for switching is that I'd like us to slowly depricate property-keywords. * testing/lisp/test-org-element.el: * contrib/lisp/ox-taskjuggler.el: A comment is modified only due to rename of function in org.el.

1 year ago

Gustav pushed to next at bzg/org-mode

  • aa8500505f Mention option html-wrap-src-lines in ORG-NEWS * etc/ORG-NEWS: Mention new option html-wrap-src-lines.
  • 8c5a788581 Remove duplicates in declare-function lines
  • be8e68be0b ob-ocaml: Support for pretty-printed outputs * lisp/ob-ocaml.el (org-babel-execute:ocaml): Support for pretty-printed outputs. E.g. the following snippet produces multiple lines of output, due to pretty-printing #+BEGIN_SRC ocaml :exports code :eval no-export :results verbatim (* Note, no need to have parentheses around sqrt, as application binds the tightest *) let rec gamma n = if n = 0 then (1.0 +. sqrt 5.0) /. 2.0 else 1.0 /. (gamma (n-1) -. 1.0) let nums = List.map gamma (List.init 5 (fun x -> x)) #+END_SRC #+NAME: gamma-tbl #+RESULTS[1fd6a3e846afdef51350eb6d7ba15c6844ccc14e]: : val gamma : int -> float = <fun> : val nums : float list = : [1.6180339887498949; 1.61803398874989468; 1.61803398874989535; : 1.61803398874989357; 1.61803398874989823] (In reality this would have 50 or so outputs, point being mathematically it shouldn't change, but due to floating point errors it does.) The regexp has the following problems: - The "." in group 5 (as-was) doesn't match new-lines, so it only matches the first line, e.g. as a list : - [1.6180339887498949, 1.61803398874989468, 1.61803398874989535, - When using "\\(.\\|\n\\)", it includes the starting indentation of the list, which makes org-babel-script-escape choke (called from org-babel-ocaml-read-list, from org-babel-ocaml-parse-output, from org-babel-execute:ocaml, the code being modified. TINYCHANGE
  • bd5f5ece55 org-manual: Document Help links * doc/org-manual.org (External Links): Document Help links.
  • 049f9f89d0 ol: Fix opening help links * lisp/ol.el ("help"): Fix typo in function opening help links.

1 year ago

Gustav created new branch next at bzg/org-mode

1 year ago

Gustav pushed to master at bzg/org-mode

  • 6175593530 Fix predicate comment string Ref. (info "(elisp) Documentation Tips") * lisp/org.el (org-at-comment-p, org-at-drawer-p) (org-at-block-p): Fix documentation.

1 year ago

Gustav pushed to master at bzg/org-mode

  • 930a1bcfc5 Fix problems with org-attach-git, failed tests Ref. mail "[O] git-annex-related org-attach tests failing on master" https://lists.gnu.org/archive/html/emacs-orgmode/2019-09/msg00030.html * lisp/org-attach-git.el (org-attach-git-commit): Add optional argument to function contract to make it work with `org-attach-after-change-hook'. Even though that argument is not used in the actual code (due to legacy functionality). * testing/lisp/test-org-attach.el (test-org-attach/dired-attach-to-next-best-subtree/1) (test-org-attach/dired-attach-to-next-best-subtree/2): Modify tests to also work if user has git-annex installed * testing/lisp/test-org-attach-git.el (test-org-attach-git/use-annex): Correct errors from previous commit, where git-annex was refactored out from org-attach into it's separate module.

1 year ago

Gustav pushed to master at bzg/org-mode

  • 4b7eda1a2f org-attach, test-org-attach: Restore fs check in org-attach-dir In commit ae9cd4370 the filsystem check for org-attach-dir was removed. Adding it back here, together with an optional flag to override the check. To satisfy compatabilty issues with org-brain. Ref. thread here: - https://github.com/Kungsgeten/org-brain/pull/203

1 year ago