Re: [PATCH] worg - Reflect the removal of org-mac-link.el from org-contrib
Is there any reason why you did not publish on non-GNU ELPA? Would rather publish there as well. However I am more familiar with MELPA for now. I fully intend to move to non-GNU asap though. Best, Ihor Salut -- Aimé Bertrand aime.bertr...@macowners.club
Re: [PATCH] worg - Reflect the removal of org-mac-link.el from org-contrib
Hi Ihor, Aimé Bertrand writes: org-mac-link was removed from org-contrib with https://git.sr.ht/~bzg/org-contrib/commit/c6aef31ccfc7c4418c3b51e98f7c3bd8e255f5e6. This is a patch (attached) for Worg to reflect the changes. Thanks for the patch! --- a/org-contrib/index.org +++ b/org-contrib/index.org @@ -110,14 +110,6 @@ the package -- it will hopefully have some documentation. Written by /Christopher Suckling/. [[contribfile:lisp/org-mac-iCal.el][Link to raw file]]. -- [[file:org-mac-link.org][/org-mac-link.el/ -- grab links from various mac applications]] :: - Grab the current link or selection from an open mac application and - insert it as a hyperlink at point in an org-mode document. Written - by /Anthony Lander/, /John Wiegley/ and /Christopher Suckling/. - This file replaces the earlier org-mac-message.el and - org-mac-link-grabber.el. - [[contribfile:lisp/org-mac-link.el][Link to raw file]]. Rather than removing the package description completely, it should be moved to the External section. Took your advice and moved the package description to the External section. diff --git a/org-contrib/org-mac-link.org b/org-contrib/org-mac-link.org deleted file mode 100644 index 2b2582e9.. --- a/org-contrib/org-mac-link.org +++ /dev/null I have looked into README.org in https://gitlab.com/aimebertrand/org-mac-link and I notice that it contains less information compared to org-mac-link.org. It would be useful to provide the missing details in the new README.org if you plan to maintain the documentation there instead of WORG. Left the documentation here and updated page to reflect the changes to the package. Also Added URLs to external sources. -** [[file:org-contrib/org-mac-link.org][org-mac-link]] -- Hyperlink to items in mac applications - grab the current link or selection from an open mac application and - insert it as a hyperlink at point in an org-mode document. Written - by /Anthony Lander/. - ** [[file:org-contrib/org-mac-mail-link.org][org-mac-mail-link]] -- Hyperlink to messages in Mail.app A small elisp file that addresses linking to Mail.app messages directly via the =org-capture= system. For wider application - support check out [[file:org-contrib/org-mac-link.org][org-mac-link]]. + support check out [[https://gitlab.com/aimebertrand/org-mac-link][org-mac-link]]. [[file:org-contrib/org-mac-mail-link.org][org-mac-mail-link]] is not changed and will become dead line after applying this patch. Left the page here. There shouldn't be any dead lines after the patch. New patch file attached. >From 6d3e5b319670574fb47a74ed3139990077190406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aim=C3=A9=20Bertrand?= Date: Thu, 30 Jun 2022 18:55:34 +0200 Subject: [PATCH] Reflect the removal of org-mac-link.el from org-contrib * org-contrib/index.org: move org-mac-link.el to external section * org-contrib/org-mac-link.org: Add more supported Apps. Add URL to Repo. Add MELPA URL. --- org-contrib/index.org| 16 org-contrib/org-mac-link.org | 26 ++ 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/org-contrib/index.org b/org-contrib/index.org index 308168fc..1d329475 100644 --- a/org-contrib/index.org +++ b/org-contrib/index.org @@ -110,14 +110,6 @@ the package -- it will hopefully have some documentation. Written by /Christopher Suckling/. [[contribfile:lisp/org-mac-iCal.el][Link to raw file]]. -- [[file:org-mac-link.org][/org-mac-link.el/ -- grab links from various mac applications]] :: - Grab the current link or selection from an open mac application and - insert it as a hyperlink at point in an org-mode document. Written - by /Anthony Lander/, /John Wiegley/ and /Christopher Suckling/. - This file replaces the earlier org-mac-message.el and - org-mac-link-grabber.el. - [[contribfile:lisp/org-mac-link.el][Link to raw file]]. - - /org-mairix.el/ -- hook mairix search into Org for different MUAs :: Written by /Georg C. F. Greve/. [[contribfile:lisp/org-mairix.el][Link to raw file]]. @@ -299,6 +291,14 @@ See [[file:../exporters/index.org][Exporters]]. - [[http://ozymandias.dk/emacs/org-import-calendar.el][/org-import-icalendar.el/]] -- import iCal events in an Org buffer :: Written by /Vagn Johansen/. +- [[file:org-mac-link.org][/org-mac-link/ -- grab links from various mac applications]] :: + Grab the current link or selection from an open mac application and + insert it as a hyperlink at point in an org-mode document. Written + by /Anthony Lander/, /John Wiegley/ and /Christopher Suckling/. + This file replaces the earlier org-mac-message.el and + org-mac-link-grabber.el. + [[https://gitlab.com/aimebertrand/org-mac-link][project page]]. + - [[https://github.com/sigma/org-magit][/org-magit/]] -- basic support for [[https://github.com/magit/magit][magit]] links :: Written by /Yann Hodique/. diff --git a/
[PATCH] worg - Reflect the removal of org-mac-link.el from org-contrib
Bonjour, org-mac-link was removed from org-contrib with https://git.sr.ht/~bzg/org-contrib/commit/c6aef31ccfc7c4418c3b51e98f7c3bd8e255f5e6. This is a patch (attached) for Worg to reflect the changes. >From a15e9ba318ce6e13b2b405bc8a5067ee2e80d787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aim=C3=A9=20Bertrand?= Date: Wed, 29 Jun 2022 18:10:59 +0200 Subject: [PATCH] Reflect the removal of org-mac-link.el from org-contrib * org-contrib/index.org: Remove listing of org-mac-link.el * org-contrib/org-mac-link.org: deleted * org-mac.org: Update package URL --- org-contrib/index.org| 8 -- org-contrib/org-mac-link.org | 55 org-mac.org | 7 + 3 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 org-contrib/org-mac-link.org diff --git a/org-contrib/index.org b/org-contrib/index.org index 308168fc..ca3052f1 100644 --- a/org-contrib/index.org +++ b/org-contrib/index.org @@ -110,14 +110,6 @@ the package -- it will hopefully have some documentation. Written by /Christopher Suckling/. [[contribfile:lisp/org-mac-iCal.el][Link to raw file]]. -- [[file:org-mac-link.org][/org-mac-link.el/ -- grab links from various mac applications]] :: - Grab the current link or selection from an open mac application and - insert it as a hyperlink at point in an org-mode document. Written - by /Anthony Lander/, /John Wiegley/ and /Christopher Suckling/. - This file replaces the earlier org-mac-message.el and - org-mac-link-grabber.el. - [[contribfile:lisp/org-mac-link.el][Link to raw file]]. - - /org-mairix.el/ -- hook mairix search into Org for different MUAs :: Written by /Georg C. F. Greve/. [[contribfile:lisp/org-mairix.el][Link to raw file]]. diff --git a/org-contrib/org-mac-link.org b/org-contrib/org-mac-link.org deleted file mode 100644 index 2b2582e9.. --- a/org-contrib/org-mac-link.org +++ /dev/null @@ -1,55 +0,0 @@ -#+TITLE: org-mac-link.el -- Grab links from open Mac applications -#+OPTIONS: ^:{} author:nil -#+STARTUP: odd -#+HTML_LINK_UP:index.html -#+HTML_LINK_HOME: https://orgmode.org/worg/ - -# This file is released by its authors and contributors under the GNU -# Free Documentation license v1.3 or later, code examples are released -# under the GNU General Public License v3 or later. - -* Overview - - This code will allow you to grab the current link or selection from - an open mac application and insert it as a hyperlink at point in an - org-mode document. - -*** Supported Applications - -The following applications are currently supported: -- Finder.app -- Mail.app -- Address Book.app -- Safari.app -- Skim.app -- Firefox.app -- Firefox.app with the Vimperator plugin -- Google Chrome.app -- Together.app - -* Installation - - Customize the org group by typing =M-x customize-group RET org RET=, then - expand the /Modules/ section, and enable =mac-link=. - - You may also optionally bind a key to activate the link grabber menu, like - this: - - : (add-hook 'org-mode-hook (lambda () - : (define-key org-mode-map (kbd "C-c g") 'org-mac-grab-link))) - -* Usage - - Activate the grabber by typing =C-c g= (or whatever key you decided to bind, - as above), or type =M-x org-mac-grab-link RET=. This will give you a menu in - the modeline allowing you to select an application. The current selection in - that application will be inserted at point as a hyperlink in your org-mode - document. - -* Customizing - - You may customize which applications appear in the grab menu by customizing - the group /org-mac-link/. Changes take effect immediately. If you are using - the org-mode version >=8.2, you can also customize whether the - =org-mac-link= should highlight the selected text when grabbing the link from - Skim.app. diff --git a/org-mac.org b/org-mac.org index e5721eca..3c99e2f1 100644 --- a/org-mac.org +++ b/org-mac.org @@ -27,15 +27,10 @@ applications other than Emacs... ** [[file:org-contrib/org-mac-iCal.org][org-mac-iCal]] -- import OS X iCal.app events into Emacs diary Written by /Christopher Suckling/. -** [[file:org-contrib/org-mac-link.org][org-mac-link]] -- Hyperlink to items in mac applications - grab the current link or selection from an open mac application and - insert it as a hyperlink at point in an org-mode document. Written - by /Anthony Lander/. - ** [[file:org-contrib/org-mac-mail-link.org][org-mac-mail-link]] -- Hyperlink to messages in Mail.app A small elisp file that addresses linking to Mail.app messages directly via the =org-capture= system. For wider application - support check out [[file:org-contrib/org-mac-link.org][org-mac-link]]. + support check out [[https://gitlab.com/aimebertrand/org-mac-link][org-mac-link]]. * For use outside Emacs -- 2.32.1 (Apple Git-133) Salut -- Aimé Bertrand aime.bertr...@macowners.club
[PATCH] org-mac-link.el: Change homepage.
Hi, would like to move the homepage. See attached patch. Thanx. Salut Aimé Bertrand >From 1b95d433f03dd8fdb151874340c82bd801d9dcfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aim=C3=A9=20Bertrand?= Date: Mon, 31 May 2021 23:04:55 +0200 Subject: [PATCH] org-mac-link.el: Change homepage. * lisp/org-mac-link.el: Change homepage by maintainer. --- lisp/org-mac-link.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-mac-link.el b/lisp/org-mac-link.el index b94df7b..68be823 100644 --- a/lisp/org-mac-link.el +++ b/lisp/org-mac-link.el @@ -9,7 +9,7 @@ ;; Alan Schmitt ;; Mike McLean ;; Maintainer: Aimé Bertrand -;; Homepage: https://sr.ht/~aimebertrand/org-mac-link/ +;; Homepage: https://gitlab.com/aimebertrand/org-mac-link ;; ;; This file is not part of GNU Emacs. ;; -- 2.30.1 (Apple Git-130)
Re: [PATCH] Link handling for qutebrowser org-mac-link.el
Hi Bastien, you know what, I wanna do my part: https://sr.ht/~aimebertrand/org-mac-link/ Salut Aimé Bastien @ 2021-05-18 16:00 : Hello Aimé, Aimé Bertrand writes: I would love to, but don not now what that entails. Willing to try, but don't wanna break stuff for the community. Thanks for your consideration, appreciated. - Do I have to stick to sourcehut or can I use gitlab as well? You can do whatever forge you'd like: I'd recommend sourcehut but it can also also any other forge you want. - I would have to make sure the packages gets into elpa, melpa or others? If you want to, there is nothing mandatory about this. Thanks!
Re: [PATCH] Link handling for qutebrowser org-mac-link.el
Hi Bastien, I would love to, but don not now what that entails. Willing to try, but don't wanna break stuff for the community. - Do I have to stick to sourcehut or can I use gitlab as well? - I would have to make sure the packages gets into elpa, melpa or others? Salut Aimé Bertrand Do you want to take over maintainership of org-mac-link.el? If so, please set up a dedicated repository for it and we will advertize this new Homepage in org-mac-link.el, then remove it from the next stable release of org-contrib.
Re: [PATCH] Link handling for qutebrowser org-mac-link.el
Bonjour Bastien, as per your wish and hint (thanx). See attached. Salut Aimé >From 5356ee77c368541113618a391b8480709c5eeb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aim=C3=A9=20Bertrand?= Date: Tue, 18 May 2021 01:23:51 +0200 Subject: [PATCH] org-mac-link.el: Add support for qutebrowser * lisp/org-mac-link.el (org-mac-grab-qutebrowser-app-p): Variable for menu option (org-mac-grab-link): Menu option for qutebrowser (org-as-mac-qutebrowser-get-frontmost-url): Retrieve url and title --- lisp/org-mac-link.el | 55 +++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/lisp/org-mac-link.el b/lisp/org-mac-link.el index f6d6da3..d887128 100644 --- a/lisp/org-mac-link.el +++ b/lisp/org-mac-link.el @@ -218,6 +218,12 @@ :group 'org-mac-link :type 'string) +(defcustom org-mac-grab-qutebrowser-app-p t + "Add menu option [q]utebrowser to grab links from qutebrowser.app." + :tag "Grab qutebrowser.app links" + :group 'org-mac-link + :type 'boolean) + ;; In mac.c, removed in Emacs 23. (declare-function do-applescript "org-mac-message" (script)) @@ -254,7 +260,8 @@ When done, go grab the link, and insert it at point." ("e" "evernote" org-mac-evernote-note-insert-selected ,org-mac-grab-Evernote-app-p) ("t" "ogether" org-mac-together-insert-selected ,org-mac-grab-Together-app-p) ("S" "kim" org-mac-skim-insert-page ,org-mac-grab-Skim-app-p) - ("A" "crobat" org-mac-acrobat-insert-page ,org-mac-grab-Acrobat-app-p))) + ("A" "crobat" org-mac-acrobat-insert-page ,org-mac-grab-Acrobat-app-p) + ("q" "utebrowser" org-mac-qutebrowser-insert-frontmost-url ,org-mac-grab-qutebrowser-app-p))) (menu-string (make-string 0 ?x)) input) @@ -1013,6 +1020,52 @@ list of message:// links to flagged mail after heading." (org-insert-heading nil t) (insert org-heading "\n" (org-mac-message-get-links "f")) + +;; Handle links from qutebrowser.app + +(defun org-as-mac-qutebrowser-get-frontmost-url () + (let ((result + (do-applescript + (concat + "set oldClipboard to the clipboard\n" + "set frontmostApplication to path to frontmost application\n" + "tell application \"qutebrowser\"\n" + " activate\n" + " delay 0.15\n" + " tell application \"System Events\"\n" + " keystroke \"y\"\n" + " keystroke \"y\"\n" + " end tell\n" + " delay 0.15\n" + " set theUrl to the clipboard\n" + " set the clipboard to oldClipboard\n" + " delay 0.15\n" + " tell application \"System Events\"\n" + " keystroke \"y\"\n" + " keystroke \"T\"\n" + " end tell\n" + " delay 0.15\n" + " set theTitle to the clipboard\n" + " set the clipboard to oldClipboard\n" + "set theResult to (get theUrl) & \"::split::\" & (get theTitle)\n" + "end tell\n" + "activate application (frontmostApplication as text)\n" + "set links to {}\n" + "copy theResult to the end of links\n" + "return links as string\n" + (car (split-string result "[\r\n]+" t + +;;;###autoload +(defun org-mac-qutebrowser-get-frontmost-url () + (interactive) + (message "Applescript: Getting qutebrowser url...") + (org-mac-paste-applescript-links (org-as-mac-qutebrowser-get-frontmost-url))) + +;;;###autoload +(defun org-mac-qutebrowser-insert-frontmost-url () + (interactive) + (insert (org-mac-qutebrowser-get-frontmost-url))) + (provide 'org-mac-link) -- 2.30.1 (Apple Git-130) Bastien @ 2021-05-16 14:21 : Hi Aimé, hope to have done this right as a first time. Thanks for the effort - but the patch is not in a readable format for me. I suggest you clone org-mode.git* and run C-x v = in the modified file to get a proper patch in the buffer, save this buffer as a patch and attach it (vs. include it) to your email. If you want your patch to be perfect, you can check this page too: https://orgmode.org/worg/org-contribute.html#commit-messages Thanks in advance,
[PATCH] Link handling for qutebrowser org-mac-link.el
Hi everyone, hope to have done this right as a first time. Work on a Mac with qutebrowser and thought the following patch would be helpful. Salut Aimé Bertrand modified lisp/org-mac-link.el @@ -218,6 +218,12 @@ :group 'org-mac-link :type 'string) +(defcustom org-mac-grab-qutebrowser-app-p t + "Add menu option [q]utebrowser to grab links from qutebrowser.app." + :tag "Grab qutebrowser.app links" + :group 'org-mac-link + :type 'boolean) + ;; In mac.c, removed in Emacs 23. (declare-function do-applescript "org-mac-message" (script)) @@ -254,7 +260,8 @@ When done, go grab the link, and insert it at point." ("e" "evernote" org-mac-evernote-note-insert-selected ,org-mac-grab-Evernote-app-p) ("t" "ogether" org-mac-together-insert-selected ,org-mac-grab-Together-app-p) ("S" "kim" org-mac-skim-insert-page ,org-mac-grab-Skim-app-p) - ("A" "crobat" org-mac-acrobat-insert-page ,org-mac-grab-Acrobat-app-p))) + ("A" "crobat" org-mac-acrobat-insert-page ,org-mac-grab-Acrobat-app-p) + ("q" "utebrowser" org-mac-qutebrowser-insert-frontmost-url ,org-mac-grab-qutebrowser-app-p))) (menu-string (make-string 0 ?x)) input) @@ -1013,6 +1020,52 @@ list of message:// links to flagged mail after heading." (org-insert-heading nil t) (insert org-heading "\n" (org-mac-message-get-links "f")) + +;; Handle links from qutebrowser.app + +(defun org-as-mac-qutebrowser-get-frontmost-url () + (let ((result + (do-applescript + (concat + "set oldClipboard to the clipboard\n" + "set frontmostApplication to path to frontmost application\n" + "tell application \"qutebrowser\"\n" + " activate\n" + " delay 0.15\n" + " tell application \"System Events\"\n" + " keystroke \"y\"\n" + " keystroke \"y\"\n" + " end tell\n" + " delay 0.15\n" + " set theUrl to the clipboard\n" + " set the clipboard to oldClipboard\n" + " delay 0.15\n" + " tell application \"System Events\"\n" + " keystroke \"y\"\n" + " keystroke \"T\"\n" + " end tell\n" + " delay 0.15\n" + " set theTitle to the clipboard\n" + " set the clipboard to oldClipboard\n" + "set theResult to (get theUrl) & \"::split::\" & (get theTitle)\n" + "end tell\n" + "activate application (frontmostApplication as text)\n" + "set links to {}\n" + "copy theResult to the end of links\n" + "return links as string\n" + (car (split-string result "[\r\n]+" t + +;;;###autoload +(defun org-mac-qutebrowser-get-frontmost-url () + (interactive) + (message "Applescript: Getting qutebrowser url...") + (org-mac-paste-applescript-links (org-as-mac-qutebrowser-get-frontmost-url))) + +;;;###autoload +(defun org-mac-qutebrowser-insert-frontmost-url () + (interactive) + (insert (org-mac-qutebrowser-get-frontmost-url))) + (provide 'org-mac-link)