{"id":31821365,"url":"https://github.com/anoncheg1/emacs-org-links","last_synced_at":"2025-10-11T13:23:40.642Z","repository":{"id":313016409,"uuid":"1045412691","full_name":"Anoncheg1/emacs-org-links","owner":"Anoncheg1","description":"Org HyperLinks are enhanced with LINE and NUM of line - we search for LINE first, if not found one or many, use NUM.","archived":false,"fork":false,"pushed_at":"2025-10-07T18:00:20.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T20:13:50.456Z","etag":null,"topics":["emacs","emacs-package","hyperlinks","navigation","org-mode"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anoncheg1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-27T06:06:33.000Z","updated_at":"2025-10-07T18:00:23.000Z","dependencies_parsed_at":"2025-09-03T12:35:02.287Z","dependency_job_id":"006f127c-c361-4212-ad39-dfe0ae5b6c44","html_url":"https://github.com/Anoncheg1/emacs-org-links","commit_stats":null,"previous_names":["anoncheg1/emacs-org-links"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Anoncheg1/emacs-org-links","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anoncheg1%2Femacs-org-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anoncheg1%2Femacs-org-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anoncheg1%2Femacs-org-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anoncheg1%2Femacs-org-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anoncheg1","download_url":"https://codeload.github.com/Anoncheg1/emacs-org-links/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anoncheg1%2Femacs-org-links/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007326,"owners_count":26084280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-package","hyperlinks","navigation","org-mode"],"created_at":"2025-10-11T13:23:37.823Z","updated_at":"2025-10-11T13:23:40.634Z","avatar_url":"https://github.com/Anoncheg1.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emacs-org-links\n\nOrg mode supports file links with line numbers and line via the following syntax:\n- `[[PATH::NUM][Link description]]`\n- `[[PATH::LINE][Link description]]`\n\nThere is `find-file-at-point` functions from ffap.el.\n\nThis package (org-links) provides facilities to help create and manage these links:\n1) The command `org-links-store-extended' copies a link to the current file, at the current point.\n2) The syntax above is extended to include a few variants that are useful for linking into source code:\n- `[[PATH::NUM::LINE]]`\n- `[[PATH::NUM-NUM::LINE]]`\n- `[[PATH::NUM-NUM]]`\n\n3) A helpful warning is triggered when a link has an ambiguous target (e.g., in the case where two targets are found).\n\nFor ex. `[[file:./notes/warehouse.el::23::(defun alina (pic))]]`\n\nYou just copy link with *C-c C-w* and insert with *C-y* in any mode.\n\n## How  [[PATH::NUM::LINE]] links works?\nFirst, we search for LINE, if not found we use NUM line number.\n\n`[[NUM-NUM]]` - used for region selection.\n\n## Why?\n\nLLMs and fuzzy search will be more effective with additional information, if you want link that point to block of code you will need a range of line numbers\n\nThis is the solution to some Org links problems:\n- links sotred without number\n- targets in Org mode: stored same as a lines\n- opening links with fuzzy search will match any first line with fuzzy substrings, not full line match, (org-link-search-must-match-exact-headline = nil required).\n\n## How?\n### Installation - from MELPA\n```elisp\n(require 'package)\n(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))\n(package-initialize)\n```\nInstall via `M-x package-install RET org-links RET`\n\n### Installation - With `use-package`\nIf your package is available on MELPA, add this to your init file:\n\n```elisp\n(use-package org-links\n  :ensure t)\n```\n\nIf installing from a GitHub repo (not yet in MELPA), specify the source:\n```elisp\n(use-package org-links\n  :straight (org-links :host github :repo \"Anoncheg1/emacs-org-links\"))\n;; Requires straight.el.\n```\n\n\n## Simple configuration\n\n```elisp\n(require 'org-links)\n;; opening for C-c C-o\n(add-hook 'org-execute-file-search-functions #'org-links-additional-formats)\n(advice-add 'org-open-file :around #'org-links-org-open-file-advice)\n;; copying\n(global-set-key (kbd \"C-c w\") #'org-links-store-extended)\n```\n\n## Advanced configuration\n\n```elisp\n(defun org-links-store-link-fallback (arg)\n  \"Copy Org-mode link to kill ring and clipboard from any mode.\nWithout a  prefix argument  ARG, copies a  link PATH::NUM  (current line\nnumber).\nCount lines from 1 like `line-number-at-pos' function does.\nWith a universal argument C - u, copies a link in the form PATH::LINE.\nSupport `image-dired-thumbnail-mode' and `image-dired-image-mode' modes.\"\n  (interactive \"P\")\n  (let ((link\n         (if (derived-mode-p 'image-dired-thumbnail-mode)\n             (concat \"[[file:\" (funcall (intern \"image-dired-original-file-name\")) \"]]\")\n           ;; - else\n           (if (derived-mode-p 'image-dired-image-mode)\n               (concat \"[[file:\" (buffer-file-name (buffer-base-buffer)) \"]]\")\n             ;; - else - programming, text and fundamental\n             (if (and (not arg)\n                      (or (derived-mode-p 'prog-mode)\n                          (and (not (derived-mode-p 'org-mode)) (derived-mode-p 'text-mode))\n                          (derived-mode-p 'fundamental-mode)))\n                 (let* ((org-link-context-for-files)\n                        (link (substring-no-properties (org-store-link nil))))\n                   (concat (substring link 0 (- (length link) 2)) \"::\" (number-to-string (line-number-at-pos)) \"]]\"))\n               ;; else - prog with argument or Org - with line for fuzzy search\n               (substring-no-properties (org-store-link nil)))))))\n    (kill-new link)\n    (message  \"%s\\t- copied to clipboard\" link)))\n\n(add-to-list 'load-path \"/home/g/sources/emacs-org-links\")\n(if (not (require 'org-links nil 'noerror))\n    (global-set-key (kbd \"C-c w\") #'org-links-store-link-fallback)\n\n  ;; org-links configuration\n  ;; opening\n  (add-hook 'org-execute-file-search-functions #'org-links-additional-formats)\n  (advice-add 'org-open-file :around #'org-links-org-open-file-advice)\n  ;; copying\n  (global-set-key (kbd \"C-c w\") #'org-links-store-extended))\n\n(require 'ol)\n(global-set-key (kbd \"C-c C-o\") #'org-open-at-point-global) ; optional\n;; recommended:\n(setopt org-link-file-path-type 'absolute) ; create links with full path\n(setopt org-link-search-must-match-exact-headline nil) ; use fuzzy search of Org links\n(setopt org-link-descriptive nil) ; show links in raw, don't hide\n```\n\n### Copy link to ring instead of opening\n```elisp\n(add-hook 'org-mode-hook (lambda ()\n                           (make-variable-buffer-local 'org-link-parameters)\n                           (dolist (scheme '(\"http\" \"https\"))\n                             (org-link-set-parameters scheme\n                                          :follow\n                                          (lambda (url arg)\n                                              (setq-local url (concat \"http:\" url arg))\n                                              (kill-new url))))))\n```\n\n## How this package works\n\nProvided function for copying link to kill ring with additional format for programming mode.\n\nFor opening links we add hook to org-execute-file-search-functions that called from `org-link-search' function, used by Org function for oppening files: `org-open-at-point' (bound to C-c C-o by default in Org mode.) and `org-open-at-point-global'.\n\n## Other packages\n- Navigation in Dired, Packages, Buffers modes https://github.com/Anoncheg1/firstly-search\n- Search with Chinese\thttps://github.com/Anoncheg1/pinyin-isearch\n- Ediff fix\t\thttps://github.com/Anoncheg1/ediffnw\n- Dired history\thttps://github.com/Anoncheg1/dired-hist\n- Selected window contrast\thttps://github.com/Anoncheg1/selected-window-contrast\n- Copy link to clipboard\thttps://github.com/Anoncheg1/org-links\n- Solution for \"callback hell\"\thttps://github.com/Anoncheg1/emacs-async1\n- Call LLMs and AI agents from Org-mode ai block. https://github.com/Anoncheg1/emacs-oai\n\n## Donate, sponsor author\nYou can sponsor author crypto money directly with crypto currencies:\n- BTC (Bitcoin) address: 1CcDWSQ2vgqv5LxZuWaHGW52B9fkT5io25\n- USDT (Tether) address: TVoXfYMkVYLnQZV3mGZ6GvmumuBfGsZzsN\n- TON (Telegram) address: UQC8rjJFCHQkfdp7KmCkTZCb5dGzLFYe2TzsiZpfsnyTFt9D","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoncheg1%2Femacs-org-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoncheg1%2Femacs-org-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoncheg1%2Femacs-org-links/lists"}