Re: Storing database credentials outside an org file
Most servers have a plain text file (permissions 004) that let you add name and pass and db > On Oct 31, 2021, at 9:51 PM, Tim Cross wrote: > > > Mike Gauland writes: > >> I often use an org file to record database queries, using sql source blocks. >> I've been putting the database credentials in the file using header-args:sql >> properties, but I'd prefer to have the credentials saved in a separate file >> for >> security reasons. >> >> Any ideas on how I could make this work? > > It probably wouldn't be too hard to use the authinfo.gpg facility via > the auth-source library which is included in Emacs. In fact, I think > sql-mode might already have support for this built in. >
Re: Storing database credentials outside an org file
Mike Gauland writes: > I often use an org file to record database queries, using sql source blocks. > I've been putting the database credentials in the file using header-args:sql > properties, but I'd prefer to have the credentials saved in a separate file > for > security reasons. > > Any ideas on how I could make this work? It probably wouldn't be too hard to use the authinfo.gpg facility via the auth-source library which is included in Emacs. In fact, I think sql-mode might already have support for this built in.
Storing database credentials outside an org file
I often use an org file to record database queries, using sql source blocks. I've been putting the database credentials in the file using header-args:sql properties, but I'd prefer to have the credentials saved in a separate file for security reasons. Any ideas on how I could make this work?
Re: [BUG] Unregistered buffer modifications detected [9.5 (9.5-g49e2f6 @ /Users/myuser/.emacs.d/straight/29/straight/build/org/)]
On Sat, Oct 30, 2021 at 11:16 PM Aaron Jensen wrote: > > Done, I'll report back. Another one, no trace: Warning (emacs): Emacs reader failed to read data for #:org-element--cache. The error was: "Invalid read syntax: \"#\", 1, 4670" Disable showing Disable logging
Project name change: bibtex-actions -> citar
For those of you who have been using oc-bibtex-actions with org-cite, two relevant name changes: First, packages are now "citar" and "citar-org", and the melpa recipe simply "citar". Naturally all related variable and functions names also change accordingly. Second, the org-cite processor name is just "citar". Sorry for any hassle. Bruce
Re: SHIFT-TAB not working in Windows-SSH-shell or Debian-tty (sometimes "M-[ ~ is undefined")
writes: > X-Post: https://github.com/daviwil/emacs-from-scratch/issues/67 > > Hello together. > > # Introduction > > I am quite new to emacs and building my init.el based the "Emacs from > Scratch" (by System Crafter) videos. In org-mode I experience some wired > behavior of the SHIFT-TAB key when (un)folding headings in an > .org file. > > # Problem > > In some cases SHIFT-TAB creates a M-[ ~ is undefined message or simply > does not work without an error message. > > # System > > Debian 11 > GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, > cairo version 1.16.0) of 2021-03-28, modified by Debian > Copyright (C) 2020 Free Software Foundation, Inc. > > # Minimal init.el > > This can be used for reproduction. > > ;; === Package setup === > (require 'package) > (setq package-archives '(("melpa" . "https://melpa.org/packages/;) >("org" . "https://orgmode.org/elpa/;) >("elpa" . "https://elpa.gnu.org/packages/;))) > (package-initialize) > > ;; === use-package == > ;; use-package to simplify the config file > (unless (package-installed-p 'use-package) > (package-refresh-contents) > (package-install 'use-package)) > > (require 'use-package) > (setq use-package-always-ensure 't) > > (use-package org) > > # Description of the behavior in multiple cases > > ## Windows SSH-terminal > > Form a Windows 10 client and its usual command prompt (not PowerShell, > not Terminal.app) I log into my machine via SSH and (of course) use > emacs in none-gui mode then. TAB works. But SHIFT-TAB produce the M-[ ~ > is undefined error. > > ## A tty terminal (Debian 11) > > Here TAB works. But S-TAB does not. The latter does not produce any > error message. There is simply no reaction on that button. > > ## Cases in where it is NOT reproducable > > - Gui mode in XFCE session on Debian 11 > - Terminal emulator (terminator) in a XFCE session on Debian 11 > - SSH terminal from Debian 11 > > ## Sidenotes > > There is a stackoverflow QA for this: > https://stackoverflow.com/q/3518846 The solution there does not work > for me (Emacs from Debian 11). > > This problem is totally out of my scope of understanding. > I don't think this is an org problem. Rather, I think your probably running into two different problems which have the same symptom. Problem 1; Linux Console The linux console is not the same as a terminal emulator. There are a number of modifier combinations which are not recognised under the linux console unless you configure them using the loadkeys command to install a keymap file (there is also a dumpkeys command to dump out the current mapping). A full explanation of what to do is beyond a simple mail list reply, but I would suggest installing the console-data package, which includes some common keymaps and reading about loadkeys. You will need to configure your Linux system to load a console keymap on boot to have key combinations like shift+tab work. Problem 2: ssh/putty I'm not a windows user and have never used putty, so this is a bit of a shot in the dark, but might provide the pointers that will help you find a solution. When it comes to input issues when using ssh, there are typically two causes - 1. The host OS running the ssh client (i.e. putty), is stealing the key combination before it is passed to the underlying program. If your GUI uses the same key combination to do something (like switch applications), the key press will not be passed to the underlying program being run. I doubt this is your issue as I suspect it would be obvious (i.e. windows would pop up a dialogue to switch applications). 2. The underlying ssh protocol is filtering out the key combination or re-mapping it to a different combination which is not recognised by the remote program. This is most likely the issue in your case. The first thing I would do is have a look at the putty configuration and see if there are options to enable passing shift, altc, ctl combinations over ssh. It would also be worthwhile checking to see what the TERM variable is set to on the remote system when you ssh in as this can also affect what key combinations are recognised. Part of the problem here is that programs like putty 'reserve' some 'escape' keys (keys which can be entered that will be directed to putty rather than the underlying ssh channel to allow you to break out of the ssh session). Note that if your using Windows 10, it includes openSSH as a CLI. You don't need putty anymore. I would try using the CLI ssh command and see if that works any better. This might at least let you know if the issue is a putty issue or an underlying ssh issue - again helping to identify at what layer you need to focus to fix the issue. Getting all of this to work can be complicated. This is primarily because there are often multiple layers involved and getting the right settings may involve tweaks in multiple layers. It can be frustrating, but unfortunately, this is what happens when your
Re: [BUG] after update to 9.5, starting org mode results in cache error messages [9.5 (9.5-gd4e192 @ c:/Users/scott/.emacs.d/straight/build/org/)]
I get a similar error to Scott's every time I save an org-mode file. I turned on backtrace and got this output: Warning (emacs): org-element--cache: Warning(210824_M3L16_translation_faceb.org): (save-buffer) Cached element is incorrect in 210824_M3L16_translation_faceb.org. (Cache tic up to date: "yes") Resetting. If this warning appears regularly, please report it to Org mode mailing list (M-x org-submit-bug-report). The element is: "(headline (:raw-value \"7643 M3L16 Translation At Facebook\" :begin 199 :end 4780 :pre-blank 0 :contents-begin 236 :contents-end 4780 :robust-begin 354 :robust-end 4778 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 199 :URL \"\" :AUTHOR \"Kira, Z.\" :NOTER_DOCUMENT \"~/pdfs/210824_M3L16_translation_faceb.pdf\" :NOTER_PAGE \"35\" :title \"7643 M3L16 Translation At Facebook\" :mode nil :granularity element ...))" The real element is: "(headline (:raw-value \"7643 M3L16 Translation At Facebook\" :begin 199 :end 4781 :pre-blank 0 :contents-begin 236 :contents-end 4781 :robust-begin 354 :robust-end 4779 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 199 :URL \"\" :AUTHOR \"Kira, Z.\" :NOTER_DOCUMENT \"~/pdfs/210824_M3L16_translation_faceb.pdf\" :NOTER_PAGE \"35\" :title \"7643 M3L16 Translation At Facebook\" :mode nil :granularity element ...))" Cache around :begin: (keyword (:key "TITLE" :value "7643 M3L16 Translation At Facebook" :begin 93 :end 137 :post-blank 0 :post-affiliated 93 :mode nil :granularity element :cached t :parent (section (:begin 1 :end 199 :contents-begin 1 :contents-end 198 :robust-begin 1 :robust-end 196 :post-blank 1 :post-affiliated 1 :mode first-section :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 4780 :end 4780 :robust-begin 92 :robust-end 4778 :post-blank 0 :post-affiliated 1 :path "/Users/greg/org/roam-stem/210824_M3L16_translation_faceb.org" :mode org-data :ID "210824_221914" :ROAM_REFS "cite:210824_M3L16_translation_faceb" :CATEGORY "210824_M3L16_translation_faceb" :cached t)) (headline (:raw-value "7643 M3L16 Translation At Facebook" :begin 199 :end 4780 :pre-blank 0 :contents-begin 236 :contents-end 4780 :robust-begin 354 :robust-end 4778 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 199 :URL "" :AUTHOR "Kira, Z." :NOTER_DOCUMENT "~/pdfs/210824_M3L16_translation_faceb.pdf" :NOTER_PAGE "35" :title "7643 M3L16 Translation At Facebook" :mode nil :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 4780 :end 4780 :robust-begin 92 :robust-end 4778 :post-blank 0 :post-affiliated 1 :path "/Users/greg/org/roam-stem/210824_M3L16_translation_faceb.org" :mode org-data :ID "210824_221914" :ROAM_REFS "cite:210824_M3L16_translation_faceb" :CATEGORY "210824_M3L16_translation_faceb" :cached t)) :org-element--cache-sync-key (9 . 199))) (section (:begin 236 :end 355 :contents-begin 236 :contents-end 355 :robust-begin 236 :robust-end 353 :post-blank 0 :post-affiliated 236 :mode section :granularity element :cached t :parent (headline (:raw-value "7643 M3L16 Translation At Facebook" :begin 199 :end 4780 :pre-blank 0 :contents-begin 236 :contents-end 4780 :robust-begin 354 :robust-end 4778 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 199 :URL "" :AUTHOR "Kira, Z." :NOTER_DOCUMENT "~/pdfs/210824_M3L16_translation_faceb.pdf" :NOTER_PAGE "35" :title "7643 M3L16 Translation At Facebook" :mode nil :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 4780 :end 4780 :robust-begin 92 :robust-end 4778 :post-blank 0 :post-affiliated 1 :path "/Users/greg/org/roam-stem/210824_M3L16_translation_faceb.org" :mode org-data :ID "210824_221914" :ROAM_REFS "cite:210824_M3L16_translation_faceb" :CATEGORY "210824_M3L16_translation_faceb" :cached t)) :org-element--cache-sync-key (9 . 199) Backtrace: org-element-cache diagnostics(210824_M3L16_translation_faceb.org): org-element-cache: Finished process. The cache size is 21. The remaining sync requests: "([4025 4025 nil 1 ... 2])" org-element-cache diagnostics(210824_M3L16_translation_faceb.org): Phase 2 org-element-cache diagnostics(210824_M3L16_translation_faceb.org): New parent at 4026: (9 . 1238)::"(headline (:raw-value \"Notes\" :begin 1238 :end 4026 :pre-blank 2 :contents-begin 1250 :contents-end 4025 :robust-begin 1252 :robust-end 4023 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1238 :title (#(\"Notes\" 0 5 (:parent ...))) :mode nil :granularity nil :parent (headline
Re: Could a .bib file be edited and organized in an "org-mode" way and still work as a .bib file?
Not much time these days to thank you for your help, specially Ihor, András, Eric. After thinking about it, I think I will maintain 2 files by now: 1.bib and 1.org. with my highlights and other notes. Best regards :-) Ypo El 19/10/2021 a las 16:45, Ihor Radchenko escribió: András Simonyi writes: The processor relies on the external Citeproc Emacs library, which must be available prior to loading this library. Should we add something to this? If yes, what is missing in your opinion? I saw this comment, but I was not sure which library it referred to. First, I looked in built-in Emacs libearies. No luck. Then, I tried search ELPA, but still no luck. Same for NonGNU ELPA. Then I tried web search and saw github/citeproc-el. It confused me, because it is not exactly "Citeproc Emacs library", but rather "A CSL 1.01 Citation Processor for Emacs.". I had to look at source file names to verify. A link to the library source code would be helpful. Also, ;; Bibliography is defined with the "bibliography" keyword. It supports files ;; with ".bib", ".bibtex", and ".json" extensions. References are exported using ;; the "print_bibliography" keyword. If there is support of ".org", it could be mentioned (with caveats, I guess). Best, Ihor
Installation on offline machines
Hi, I just got a bit confused about the announcement: "Also, Org 9.5 is available as tar.gz and zip archives, but this installation method is also deprecated." >From the methods that were available this was the easiest method for obtaining and distributing the latest versions org-mode on systems that have no internet accsess. Can you elaborate why you want to deprecate this method? As I also wasn't able to locate neither the zip nor the tar I cloned the git now like this: git clone -b 'release_9.5' --single-branch --depth 1 https://git.savannah.gnu.org/git/emacs/org-mode.git and made a .tar.gz from that. Is this different then from what I would get if I download the tar from GNU ELPA? Please CC me in answers to the message, as I am not (yet) subscribed to the org mailinglist. Best regards, Christian -- Edmund Christian Herenz (ESO Fellow) Office: M152 ESO Vitacura Email: eher...@eso.org Alonso de Córdova 3107 Phone: +56 2 2463 3047 (Office) Vitacura, Casilla 19001 +56 9 4613 7517 (Mobile) Santiago de Chile, Chile WWW:http://www.sc.eso.org/~eherenz/
SHIFT-TAB not working in Windows-SSH-shell or Debian-tty (sometimes "M-[ ~ is undefined")
X-Post: https://github.com/daviwil/emacs-from-scratch/issues/67 Hello together. # Introduction I am quite new to emacs and building my init.el based the "Emacs from Scratch" (by System Crafter) videos. In org-mode I experience some wired behavior of the SHIFT-TAB key when (un)folding headings in an .org file. # Problem In some cases SHIFT-TAB creates a M-[ ~ is undefined message or simply does not work without an error message. # System Debian 11 GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian Copyright (C) 2020 Free Software Foundation, Inc. # Minimal init.el This can be used for reproduction. ;; === Package setup === (require 'package) (setq package-archives '(("melpa" . "https://melpa.org/packages/;) ("org" . "https://orgmode.org/elpa/;) ("elpa" . "https://elpa.gnu.org/packages/;))) (package-initialize) ;; === use-package == ;; use-package to simplify the config file (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure 't) (use-package org) # Description of the behavior in multiple cases ## Windows SSH-terminal Form a Windows 10 client and its usual command prompt (not PowerShell, not Terminal.app) I log into my machine via SSH and (of course) use emacs in none-gui mode then. TAB works. But SHIFT-TAB produce the M-[ ~ is undefined error. ## A tty terminal (Debian 11) Here TAB works. But S-TAB does not. The latter does not produce any error message. There is simply no reaction on that button. ## Cases in where it is NOT reproducable - Gui mode in XFCE session on Debian 11 - Terminal emulator (terminator) in a XFCE session on Debian 11 - SSH terminal from Debian 11 ## Sidenotes There is a stackoverflow QA for this: https://stackoverflow.com/q/3518846 The solution there does not work for me (Emacs from Debian 11). This problem is totally out of my scope of understanding. Thanks in advance
Re: send agenda-weekly-view via email html formated
Uwe Brauer writes: > Thanks, works very nicely, I only will send it inline, because then it is > nicely displayed in HTML enabled MTA. ---(mml-attach-file (file-name-concat (temporary-file-directory)"agenda.html") +++(mml-attach-file (file-name-concat (temporary-file-directory)"agenda.html") nil nil "inline"
Re: send agenda-weekly-view via email html formated
>>> "IR" == Ihor Radchenko writes: > Uwe Brauer writes: >> Thanks I run a test in an org-agenda and obtained >> >> , >> | >> | Debugger entered--Lisp error: (void-function file-name-concat) > That's a function from latest Emacs. You may also use simple concat or > even directly "/tmp/agenda.html" (temporary-file-directory is only > available from Emacs 26). Thanks, works very nicely, I only will send it inline, because then it is nicely displayed in HTML enabled MTA. smime.p7s Description: S/MIME cryptographic signature
Re: send agenda-weekly-view via email html formated
Uwe Brauer writes: > I am running Emacs master 83a915d3dfafd5f3d737afe > not too old, I'd say > > > But that function is not defined. > > That's 6 month old :D file-name-concat is 3 month old (f04f8126f0).
Re: send agenda-weekly-view via email html formated
Uwe Brauer writes: > Thanks I run a test in an org-agenda and obtained > > , > | > | Debugger entered--Lisp error: (void-function file-name-concat) That's a function from latest Emacs. You may also use simple concat or even directly "/tmp/agenda.html" (temporary-file-directory is only available from Emacs 26). Best, Ihor
Re: send agenda-weekly-view via email html formated
>>> "UB" == Uwe Brauer writes: >>> "IR" == Ihor Radchenko writes: >> Ihor Radchenko writes: >>> Uwe Brauer writes: >>> >>> I know I can save my weekly agenda view as a HTML file and then send it as >>> as attachment. >> Sorry, I misread your first message. Attaching and sending is easy: >> (defun org-agenda-email () >> "Email agenda in current buffer as attachment." >> (interactive) >> (let ((to (read-string "Send to: ")) >> (subject (read-string "Subject: "))) >> (unless (derived-mode-p 'org-agenda-mode) (user-error "Should start from >> agenda view.")) >> (org-agenda-write (file-name-concat (temporary-file-directory) >> "agenda.html") nil nil (current-buffer)) >> (compose-mail to subject) >> (save-excursion >> (goto-char (point-max)) >> (mml-attach-file (file-name-concat (temporary-file-directory) >> "agenda.html") > Thanks I run a test in an org-agenda and obtained > , > | > | Debugger entered--Lisp error: (void-function file-name-concat) > | (file-name-concat (temporary-file-directory) "agenda.html") > | (org-agenda-write (file-name-concat (temporary-file-directory) > "agenda.html") nil nil (current-buffer)) > | (let ((to (read-string "Send to: ")) (subject (read-string > | "Subject: "))) (if (derived-mode-p 'org-agenda-mode) nil (user-error > | "Should start from agenda view.")) (org-agenda-write > | (file-name-concat (temporary-file-directory) "agenda.html") nil nil > | (current-buffer)) (compose-mail to subject) (save-excursion > | (goto-char (point-max)) (mml-attach-file (file-name-concat > | (temporary-file-directory) "agenda.html" > | org-agenda-email() > | funcall-interactively(org-agenda-email) > | apply(funcall-interactively org-agenda-email nil) > | repeat-complex-command(1) > | funcall-interactively(repeat-complex-command 1) > | call-interactively(repeat-complex-command nil nil) > | command-execute(repeat-complex-command) > ` I debugged it the problem is file-name-concat. I am running Emacs master 83a915d3dfafd5f3d737afe not too old, I'd say But that function is not defined. smime.p7s Description: S/MIME cryptographic signature
Re: send agenda-weekly-view via email html formated
>>> "IR" == Ihor Radchenko writes: > Ihor Radchenko writes: >> Uwe Brauer writes: >> >>> I know I can save my weekly agenda view as a HTML file and then send it as >>> as attachment. > Sorry, I misread your first message. Attaching and sending is easy: > (defun org-agenda-email () > "Email agenda in current buffer as attachment." > (interactive) > (let ((to (read-string "Send to: ")) > (subject (read-string "Subject: "))) > (unless (derived-mode-p 'org-agenda-mode) (user-error "Should start from > agenda view.")) > (org-agenda-write (file-name-concat (temporary-file-directory) > "agenda.html") nil nil (current-buffer)) > (compose-mail to subject) > (save-excursion > (goto-char (point-max)) > (mml-attach-file (file-name-concat (temporary-file-directory) > "agenda.html") Thanks I run a test in an org-agenda and obtained , | | Debugger entered--Lisp error: (void-function file-name-concat) | (file-name-concat (temporary-file-directory) "agenda.html") | (org-agenda-write (file-name-concat (temporary-file-directory) "agenda.html") nil nil (current-buffer)) | (let ((to (read-string "Send to: ")) (subject (read-string "Subject: "))) (if (derived-mode-p 'org-agenda-mode) nil (user-error "Should start from agenda view.")) (org-agenda-write (file-name-concat (temporary-file-directory) "agenda.html") nil nil (current-buffer)) (compose-mail to subject) (save-excursion (goto-char (point-max)) (mml-attach-file (file-name-concat (temporary-file-directory) "agenda.html" | org-agenda-email() | funcall-interactively(org-agenda-email) | apply(funcall-interactively org-agenda-email nil) | repeat-complex-command(1) | funcall-interactively(repeat-complex-command 1) | call-interactively(repeat-complex-command nil nil) | command-execute(repeat-complex-command) ` smime.p7s Description: S/MIME cryptographic signature
Re: send agenda-weekly-view via email html formated
Ihor Radchenko writes: > Uwe Brauer writes: > >> I know I can save my weekly agenda view as a HTML file and then send it as >> as attachment. Sorry, I misread your first message. Attaching and sending is easy: (defun org-agenda-email () "Email agenda in current buffer as attachment." (interactive) (let ((to (read-string "Send to: ")) (subject (read-string "Subject: "))) (unless (derived-mode-p 'org-agenda-mode) (user-error "Should start from agenda view.")) (org-agenda-write (file-name-concat (temporary-file-directory) "agenda.html") nil nil (current-buffer)) (compose-mail to subject) (save-excursion (goto-char (point-max)) (mml-attach-file (file-name-concat (temporary-file-directory) "agenda.html") Best, Ihor
Re: send agenda-weekly-view via email html formated
Uwe Brauer writes: > Hi > > I know I can save my weekly agenda view as a HTML file and then send it as as > attachment. > > I was wondering whether someone knows about a function, already doing it. > I googled and I also looked up the available package, without any results. > > Anybody has an idea? You can export agenda to txt, org, html, pdf, ps, or ics using C-x C-w in agenda (org-agenda-write).
send agenda-weekly-view via email html formated
Hi I know I can save my weekly agenda view as a HTML file and then send it as as attachment. I was wondering whether someone knows about a function, already doing it. I googled and I also looked up the available package, without any results. Anybody has an idea? Thanks and regards Uwe Brauer