Fwd: Re: Emacs master: different (ugly) font in org-mode [Windows, macOS]
Start of forwarded message From: Ihor Radchenko To: Protesilaos Stavrou Cc: Stefan Kangas , Angelo Graziosi , Eli Zaretskii , emacs-de...@gnu.org, emacs-org-m...@gnu.org, Nicolas Goaziou Subject: Re: Emacs master: different (ugly) font in org-mode [Windows, macOS] Date: Thu, 07 Oct 2021 13:24:21 +0800 Protesilaos Stavrou writes: > On 2021-10-07, 12:57 +0800, Ihor Radchenko wrote: > >>> That granted, I now think this is a bad default. Such a feature should >>> be opt-in, otherwise it can catch users by surprise (as shown in this >>> discussion---also related is bug#46971 for which I sent a patch with >>> regard to the modus-themes). >> >>> Can Org be patched for emacs-28? How does this work in terms of syncing >>> with org.git? My suggestion would be to revert commit 667cb6f1a in >>> org.git, though I am not sure how to proceed. >> >> Given the raised concern, you can request reverting the patch in Org ML. >> That should go to bugfix (=stable) branch. Then, Emacs devs can merge the >> latest >> bugfix any time they prefer. > > Thank you, Ihor! If others have no objections or better ideas, I will > prepare that patch later today. I do not think that you need to prepare a separate patch. Reverting is easy. I am forwarding this message to Org ML and CCing Nicolas. Dear Orgers, There have been issues [1] with recent fontification changes [2] on Windows. Default fixed pitch font on Windows looks very bad and there is no easy way to fix from Emacs. Prot is requesting to revert the patch. [1] https://lists.gnu.org/r/emacs-devel/2021-10/msg00064.html [2] https://list.orgmode.org/875z8njaol@protesilaos.com/ Best, Ihor End of forwarded message
Re: [BUG] org-context called from link in org-agenda entry returns wrong values [9.5 (9.5-g0a86ad @ /home/.emacs.d/elpa/org-9.5/)]
Harald Judt writes: > Hi, > > I am using this function to copy links from the agenda to the clipboard: > > (defun my-copy-org-url () > (interactive) > (let* ((link-info (assoc :link (org-context))) > ... org-context is ancient. It relies on org-links being fontified using 'org-link face and would fail for any non-standard link with :face link parameter. Moreover, the return value will be different depending on org-link-descriptive setting. We should probably deprecate this function and encourage using org-element-context. So, I recommend rewriting your code with org-element-context. > This indeed worked fine with previous versions of org, but recently started > to fail to extract the link. Example entry to put into your agenda > to test this: > > * TODO Header with [[https://orgmode.org/][Link]] > SCHEDULED: <2021-10-06 Mi 12:00> > > Now the function above should extract "https://orgmode.org/;, but > instead the text extracted is "Lin". It seems that some of the faces were not applied together, making next-single-property change stop early because faces are not 'eq (though 'equal). Not sure if we really need to do anything about it. It is a bad idea to rely on next/prev-property-change in org-context anyway. Best, Ihor
[SOLVED] (was: how to randomize (scample) regions in a an org buffer)
>>> "UB" == Uwe Brauer writes: > Hi > I need to replace private information in my org files, but only region wide. > I found > https://www.reddit.com/r/emacs/comments/6pc0ts/sanitize_buffer_by_replacing_words_with_random/ > Where two such functions are discussed, one is even for org files, > however only buffer wide and the code looks rather complicated to me. No it was actually quite simple: (defun randomise-region () "Like `ap/replace-words-randomly', but only replace inside region if it is active. If the region is not active, replace from point to the end of the buffer. The region is never considered active outside `transient-mark-mode'. " (interactive) (if (or (and (boundp 'zmacs-region-active-p) zmacs-region-active-p) (and (boundp 'transient-mark-mode) transient-mark-mode mark-active)) (save-restriction (save-excursion (narrow-to-region (point) (mark)) (goto-char (point-min)) (ap/replace-words-randomly))) (ap/replace-words-randomly))) smime.p7s Description: S/MIME cryptographic signature
how to randomize (scample) regions in a an org buffer
Hi I need to replace private information in my org files, but only region wide. I found https://www.reddit.com/r/emacs/comments/6pc0ts/sanitize_buffer_by_replacing_words_with_random/ Where two such functions are discussed, one is even for org files, however only buffer wide and the code looks rather complicated to me. Anybody knows about such a function? Thanks Uwe Brauer
[BUG] org-context called from link in org-agenda entry returns wrong values [9.5 (9.5-g0a86ad @ /home/.emacs.d/elpa/org-9.5/)]
Hi, I am using this function to copy links from the agenda to the clipboard: (defun my-copy-org-url () (interactive) (let* ((link-info (assoc :link (org-context))) (text (when link-info (buffer-substring-no-properties (or (cadr link-info) (point-min)) (or (caddr link-info) (point-max)) (if (not text) (error "Point not in an org link.") (string-match org-bracket-link-regexp text) (kill-new (url-encode-url (substring text (match-beginning 1) (match-end 1 (message "Org link URL copied to clipboard." This indeed worked fine with previous versions of org, but recently started to fail to extract the link. Example entry to put into your agenda to test this: * TODO Header with [[https://orgmode.org/][Link]] SCHEDULED: <2021-10-06 Mi 12:00> Now the function above should extract "https://orgmode.org/;, but instead the text extracted is "Lin". Stepping through the function with edefun-debug tells me that org-context returns the wrong values ((:link begin end)). Note that the function seems to work fine if I call it from a normal org file (not from the agenda) interactively, and I get ((:item i j) (:link x y)) with the correct link. (Note in the following section I have edited some paths and the list of my org files for privacy reasons, but that shouldn't be relevant to this issue.) Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.16.0) of 2021-09-27 Package: Org mode version 9.5 (9.5-g0a86ad @ /home/.emacs.d/elpa/org-9.5/) current state: == (setq org-roam-db-location "~/.cache/emacs/org-roam.db" org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-capture-prepare-finalize-hook '(org-roam-capture--install-finalize-h) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-roam-db-node-include-function '(closure (t) nil t) org-refile-targets '((org-agenda-files :maxlevel . 2)) org-table-convert-region-max-lines 2000 org-roam-mode-hook '(org-roam-bibtex-mode) org-roam-bibtex-mode t org-agenda-files '("snip.org") org-reveal-start-hook '(org-decrypt-entry) org-archive-location "~/work/org/archive/%s_archive::" org-mode-hook '(org-bullets-mode org-clock-load (lambda nil (add-hook 'before-save-hook 'my-org-add-ids-to-headlines-in-file nil 'local)) #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes #[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] whitespace-mode yas-minor-mode) org-clock-persist 'history org-archive-hook '(org-attach-archive-delete-maybe) org-roam-capture-new-node-hook '(orb--insert-captured-ref-h) org-confirm-elisp-link-function 'yes-or-no-p org-journal-mode-hook '((closure (org-journal-search-mode-abbrev-table org-journal-search-mode-syntax-table org-journal-mode-abbrev-table org-journal-mode-syntax-table view-exit-action t) nil (add-hook org-journal-encrypt-on 'org-journal-encryption-hook nil t)) (lambda nil (add-hook org-journal-encrypt-on 'org-journal-encryption-hook nil t))) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-log-reschedule 'note org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((emacs-lisp . t) (shell . t) (python . t) (sed . t) (awk . t) (sql . t) (ditaa . t)) org-log-done 'time org-journal-date-format "%Y-%m-%d %A" org-agenda-span 'fortnight org-agenda-loop-over-headlines-in-active-region nil org-roam-find-file-hook '(org-roam-buffer--setup-redisplay-h org-roam--register-completion-functions-h org-roam--replace-roam-links-on-save-h org-roam-open-id-with-org-roam-db-h org-roam-db-autosync--setup-update-on-save-h) org-catch-invisible-edits t org-occur-hook '(org-first-headline-recenter) org-log-into-drawer t org-ditaa-jar-path "/usr/share/ditaa/lib/ditaa.jar" org-ref-bibtex-assoc-pdf-with-entry-move-function 'rename-file org-agenda-include-diary t org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate
Re: Rescaling #+INCLUDES / Not centering #+INCLUDE?
On 10/5/21 5:06 PM, Eric S Fraga wrote: > A data point: your example works just fine in org 9.5. Arg... Yes sorry, I mixed up my MCE with my tests to get rid of the scalebox. You'll find attached the actual non working .org file with the \scalebox that conflicts with the \begin{center} that is automatically inserted by #+INCLUDE My (unsuccessful) approaches so far to find a solution: 1. remove the automatic \begin{center} inserted by #+INCLUDE => using :center nil in #+INCLUDE or in additional #+ATTR_LATEX added above #+INCLUDE does not work 2. remove the use of \scalebox by using a more "org-mode"'s way of doing things => using :width in #+INCLUDE or in additional #+ATTR_LATEX or even passing options to dot have no effect (see previously attached file) Thanks for any help PS: Sorry for my other mistake: I thought MELPA had latest org-mode, but I've now switched to actual lastest org-mode using git clone. Same problem occurs. -- Guillaume MULLER Data Scientist, PhD Télécom Saint-Étienne (office i119) 25 rue du Dr Remy Annino - Laboratoire Hubert Curien (office e002) 18 rue du Pr Benoît Lauras - 42000 Saint-Étienne FRANCE #+STARTUP: showall indent beamer #+LATEX_CLASS: beamer * Test Slide #+LATEX: \scalebox{.85\textwidth}{ #+INCLUDE: test.dot src dot :center nil :file test.png #+LATEX: } OpenPGP_signature Description: OpenPGP digital signature
how to export to odt with 11 or 10 pt fonts? Default font setting
Hi I searched about google, but it seems that the only way to have a 10 or 11 pt font size is, again, by using styles. Am I right? Thanks Uwe Brauer
Re: [Worg] New subdirectory not fully built?
On 05/10/2021 23:37, Adam Porter wrote: Max Nikulin writes: It seems, you have managed to solve the problem, I guess, by fixing link targets: https://git.sr.ht/~bzg/worg/commit/31f4212874e1bc54f335e329f6bcee83801dcf9c I did that, but see also the following commit where I gave in and set "broken-links:t". There were too many internal "id:" links to convert manually in that very old file that few will ever read, anyway. :) (And I thought that "id:" links worked in exported files, but apparently not?) There was a recent bug report concerning external "id:" links and publish (it seems, worg does not use publish and it may cause some problems as well): https://list.orgmode.org/4617246.m1MCmUpgFQ@pluto "org-id with ox-html" An issue with internal "id:" links may be caused by absence of "(require 'org-id)" in publish.sh. P.S. For some reason "fireforgrepofile:" custom link definition was removed some time ago despite the repository is alive. Actually github has some newer commits.
Maintainer Duties
Hi all, Only 30 out of the 122 Elisp files have a maintainer. I'm interested in maintaining one or more files but I'm not sure what it means. Can we make it clearer, as perhaps other people are interested and want to know. Here are some possible aspects of the role: 1. Actively improve the file content: function documentation, error handling, formatting, notation (syntax). 2. Identify messages in the mailing list related to the file. Participate in these threads. 3. Become an expert on the functionality in the file. 4. Offer new functionality, features, improve existing code (semantics). 5. Review all patches related to the file and then approve them or order a rework. Finally, merge them. Or maybe some other aspects? Thanks, -- Daniel Fleischer
Bug: Tag Selection Face Doesn't Toggle
Hi, when selecting tags using fast selection and then de-selecting, the face doesn't toggle back to regular face. Fast selection means `org-use-fast-tag-selection' is t. Checked with emacs -Q + (setq org-use-fast-tag-selection t). Org 9.5, commit cc2490a7061955395c4f5a1a23a088044554a2f7. Emacs 29.0.50, hash 9f041cdfaca0f3def74eb7d3348bbf35c12bcc5b. -- Daniel Fleischer
Re: Citation in footnote not expanded/exported to LaTeX (using Org-ref-cite)
Hello, Elias Bounatirou writes: > However, it appears Nicolas' MWE unfortunately does not reproduce the > issue. It's not the footnote that is omitted/ not exported, it's the > citation in the footnote that is left out (when the footnote follows two or > more citations, of which one has a suffix). In Nicolas' MWE, there is no > citation in the footnote. What seems to me (being no export on LaTeX) > strange about Bruce's LaTeX output is that there is no command > \footnote{...} or the like. So is the footnote-part of the LaTeX output > real LaTeX? (Sorry for this naïve question.) I noticed my ECM was not right. It took me a while to figure out the issue. > I've tested again. > With verbose I get the same erroneous result: the citation in the footnote > is not rendered (using the development version of org-mode, see below): > INPUT: > [...] > Body text [cite: @ravlic2021; @saric2010 with a SUFFIX][fn:1] [...] > [fn:1]Test [cite: @senker1987] > > LaTeX OUTPUT (shortened): > > Body text \autocites{ravlic2021}[][with a SUFFIX]{saric2010}\footnote{Test} I think I fixed it. Could you confirm it? Thank you. Regards, -- Nicolas Goaziou
Re: [PATCH] The align of time is not beautiful as 9.4 when I update to org 9.5.
Hello, Ihor Radchenko writes: > Nicolas Goaziou writes: > >> Also, the fix belongs to `org-get-time-of-day', which is also >> responsible for formatting the output. > > I doubt so. `org-get-time-of-day' is used to format ending time in time > ranges. If we force fixed width in `org-get-time-of-day', we may have > something like " 8:00- 9:00" instead of " 8:00-9:00". On the other > hand, the current behaviour for non-nil org-agenda-timegrid-use-ampm, we > already have "8am- 9am" even without the patch. > > WDYT? Fair enough. I think I should not even try to understand "org-agenda.el". Regards, -- Nicolas Goaziou
Re: Citation not inserted as 1st item in footnote (using org-cite and org-ref-cite)
Nicolas Goaziou writes: > This allows one to insert a citation in the middle of the citation > number, which is not desirable either. IOW, an additional check is > required. I think this is now fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [PATCH] Accept more :tangle-mode specification forms
On 05/10/2021 21:45, Timothy wrote: Indeed, I’ve basically supported every form I could think of. I’m currently inclined to cut it down to: • 755 • “rwxrw-r–” (`ls -l’ style) • chmod style with `org-babel-tangle-default-mode’ and `file-modes-symbolic-to-number’ Maybe with (if anybody says they would like this) • #o755 (elisp octal) • 0755 (C octal) • “rwx” = user perm, bit-or’d with `org-babel-tangle-default-mode’ for the rest (i.e. `org-babel-tangle-default-mode’, but not exceeding the user perm) My opinion (discussion should not mean that I insist) is that since the following is currently working #+begin_src bash :tangle yes :tangle-mode 755 echo "Hello" #+end_src naked numbers (strings looking like numbers) should be forbidden. `org-lint' should report such lines and it should be at least warning for `org-babel-tagle'. It is safer to define macros (namely macros, not just functions) that check argument type, e.g. (filemode-octal "755") ; OK (filemode-octal #o755) ; OK (filemode-octal 755) ; Error Maybe they should return not just raw number but e.g. tagged pair (#o755 . 'filemode) The point is that it should be hard to pass decimal or hex number (though it might be possible through a function generating tagged cons). It is better to be a bit more verbose and explicit than to allow weird hard to notice later errors. Problem cases are too close to valid ones with current behavior.
Re: Inequalities in math blocks
Rudolf Adamkovič writes: FYI: I have just discovered that this bug screwed up a paper I submitted to university this week. In the paper, I wrote the following: "[…] every term $t\in{}q$ with $idf(t)>c$ for some constant $c$ […]", and the "idf(t) > c" part got exported as "idf(t)". I cannot fix the paper at this point. Uh-oh! R+ -- "Logic is a science of the necessary laws of thought, without which no employment of the understanding and the reason takes place." -- Immanuel Kant, 1785 Rudolf Adamkovič Studenohorská 25 84103 Bratislava Slovakia [he/him]