Re: I can't set dabbrev to respect the writen case
Thanks a lot, Tim. I am saving those options to try them. Ypo El 17/05/2022 a las 2:53, Tim Cross escribió: Ypo writes: Thanks, Samuel I've uninstalled fancy-dabbrev, and it seems to work when I complete using M-/. But, now I don't have candidates to choose the completion. Any advice with this? Best regards, Ypo You might want to have a look at the corfu and cape packages. https://github.com/minad/corfu https://github.com/minad/cape The corfu packages is basically a completions UI package built on-top of built-in Emacs completion functionality while cape is a set of completions at point functions which has support for dabbrv (and others). Alternatively, if your a copmany mode user, I believe there are company dabbrv modes you can install. Company is probably more mature in the sense it has been around for some time. However, I like the underlying principals of corfu (i.e. leverage of existing Emacs functionality rather than re-inventing it). I did find with corfu and cape that it took a bit of experimentation and use to get things 'just right'. However, once you have it working and are use to it, I find it works well (I'm using Emacs 28 and 29(.
Re: I can't set dabbrev to respect the writen case
Thanks, Samuel. I am trying Company. It works with dabbrev out of the box, and I understand its options for cases, so I get what I intended. Best regards, Ypo El 17/05/2022 a las 1:43, Samuel Wales escribió: did you confirm that fancy-dabbrev is not setting a dabbrev setting? On 5/16/22, Samuel Wales wrote: by default hippie-expand cycles. to cycle backward you can undo. idk if it or dabbrev has a menu. idk if this is useful but there is at least one menu package and many completion packages at seemingly varying levels of interoperability. some things have menus built in. there is some degree of modularity in some packages, especially a set of minibuffer completion packages, which is not waht you are looking for. i am confused by the many options. so what i would start with is as an ignoramus [that's me] is trying to find an overview of what's out there, dabbrev settings or a hook for a menu, he settings, whether anything with a menu incluing a menu package is intended to fit modularly into dabbrev, whether dabbrev or he fit into some framework [company?] that has or can use a menu. possibly you already tried those things but in cas nobod anwers. On 5/16/22, Ypo wrote: Thanks, Samuel I've uninstalled fancy-dabbrev, and it seems to work when I complete using M-/. But, now I don't have candidates to choose the completion. Any advice with this? Best regards, Ypo El 16/05/2022 a las 0:15, Samuel Wales escribió: i do not use fancy-dabbrev, but i use dabbrev in hippie-expand. it seems to do as you want. it should be possible to run hippie-expand with just dabbrev. it might not be exactly the same because he might have its own version of dabbrev. which might be what you want in this case. note that you have control over where dabbrev gets its data. idk if that is a feature of vanilla dabbrev. i do not use any dabbrev settings or any he settings except the main one for he. it is set to '(try-expand-dabbrev-visible try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol ;;do i want this first? am i supposed to use another thing to ;;complete from that point? ;;try-complete-lisp-symbol-partially ;;try-expand-whole-kill try-complete-file-name-partially try-complete-file-name hoka-try-complete-with-calc-result) On 5/14/22, Ypo wrote: Hi I find dabbrev and fancy-dabbrev very useful to typing fast. But there is a problem I am not able to solve: When I apply an expansion while writing, the case is always that of the expansion, I can't make it to respect what I have written. An example: — (Typing) "Hel — (Offered expansion) "hello" — (What I get when accepting the expansion) "hello" — (What I wanted) "Hello" Best regards, Ypo -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: Tips on using Org-mode to manage a reading list
just a brainstorm but is it possible already or in principle for c-c ' to serialize property values and also newline-ize table cells? On 5/16/22, Greg Minshall wrote: > hi, Sébastien, > >> I got to many books and articles for a table... > > hmm. why too many? each column would be an attribute (title, author, > score, publisher, ...), or a status (unread, finished, ...) and each row > would be a book. that should scale. > > the downside of a table (though that is almost certainly what i would > have suggested) is the "notes", i.e., the freeform text that would > follow the property table in a node in your scheme. there's not a > "naive" way to do that. > > cheers, Greg > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: Tips on using Org-mode to manage a reading list
hi, Sébastien, > I got to many books and articles for a table... hmm. why too many? each column would be an attribute (title, author, score, publisher, ...), or a status (unread, finished, ...) and each row would be a book. that should scale. the downside of a table (though that is almost certainly what i would have suggested) is the "notes", i.e., the freeform text that would follow the property table in a node in your scheme. there's not a "naive" way to do that. cheers, Greg
Re: I can't set dabbrev to respect the writen case
looks interesting. i like ido and i like hippie-expand. pointless comment: i wonder if normal folk cannot keep up with all the completion stuff? of course it's indicative of a burgeoning ecosystem, and there are probably sensible reasons for all of it. i could not even systematize the major packages in some kind of outline or so, much less know their uses, or even list them. i recently found out something is used in org but have no idea where it would be used. i think mastering emacs. where you complete [buffer, minibuffer, shell mode commands, maybe other stuff, some combination]. whether emacs default completion is harnessed. where emacs default completion even can be used [everywhere?]. what /versions/ of emacs are suitable for default completion. in how many frameworks can one use dabbrev? which are composable. which are likely to be supported in future [e.g. popular]. which have e.g. ido-clever-match cleverness? i got to the point where i figured out that company is for at least buffer and does not harness default completion and is idk, maybe incompatible with the new composable orthogonal things. i use ido with ido-hacks [harnesses default completion] and ido-clever-match for minibuffer, totally punt on shell mode with bad window management [can't keep up with the new alist thing either] and no semantics, and hippie expand. i was able to reject ivy and helm for my purposes, other stuff sounds intriguing, but would take forever to keep track of. not asking for advice. just sorta kinda wondering how much effort informed folk put into keeping track. [just realized most of this thread is ot for org mode, so op might get help on emacs list if we're not useful enough.] On 5/16/22, acdw wrote: > On 2022-05-16 (Monday) at 12:25, Ypo wrote: > >> Thanks, Samuel >> >> I've uninstalled fancy-dabbrev, and it seems to work when I complete >> using M-/. But, now I don't have candidates to choose the completion. >> Any advice with this? >> > > I also wrote the package `hippie-completing-read'[1] to give a nicer UI (in > my opinion) to the hippie-expand command. > > [1]: https://github.com/duckwork/hippie-completing-read > > -- > ~ acdw > acdw.net | breadpunk.club/~breadw > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: I can't set dabbrev to respect the writen case
On 2022-05-16 (Monday) at 12:25, Ypo wrote: > Thanks, Samuel > > I've uninstalled fancy-dabbrev, and it seems to work when I complete > using M-/. But, now I don't have candidates to choose the completion. > Any advice with this? > I also wrote the package `hippie-completing-read'[1] to give a nicer UI (in my opinion) to the hippie-expand command. [1]: https://github.com/duckwork/hippie-completing-read -- ~ acdw acdw.net | breadpunk.club/~breadw
Re: I can't set dabbrev to respect the writen case
Ypo writes: > Thanks, Samuel > > I've uninstalled fancy-dabbrev, and it seems to work when I complete using > M-/. But, now I don't have candidates to choose the > completion. Any advice with this? > > Best regards, > Ypo > You might want to have a look at the corfu and cape packages. https://github.com/minad/corfu https://github.com/minad/cape The corfu packages is basically a completions UI package built on-top of built-in Emacs completion functionality while cape is a set of completions at point functions which has support for dabbrv (and others). Alternatively, if your a copmany mode user, I believe there are company dabbrv modes you can install. Company is probably more mature in the sense it has been around for some time. However, I like the underlying principals of corfu (i.e. leverage of existing Emacs functionality rather than re-inventing it). I did find with corfu and cape that it took a bit of experimentation and use to get things 'just right'. However, once you have it working and are use to it, I find it works well (I'm using Emacs 28 and 29(.
Re: Tips on using Org-mode to manage a reading list
On 16 May 2022, William Denton wrote: Your plan looks very much like something I saw on Planet Emacslife¹ a week or two ago ... but now I can't find it because it scrolled off the bottom. Maybe someone else here saw it? Or is the one who wrote it? It was someone using properties to store information about the books and then using a column view to display all the information in a table. Aha! I realized Sacha Chua must have listed it---what escapes her keen eye?---and found it in her Emacs News from a fortnight ago: https://baty.net/2022/book-logging-in-emacs/ Bill -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. Toronto, Canada
Re: Tips on using Org-mode to manage a reading list
Thanks for your suggestions. I got to many books and articles for a table, but using tables for statistics could be usefull. :) Le 17 mai 2022 01:28:47 GMT+02:00, William Denton a écrit : >On 16 May 2022, Sébastien Gendre wrote: > >> My goals are to: >> * List books and articles I want to read >> * Track books I have to buy and which I already own >> * Track books and articles I have read >> * Take notes on books I have read >> >> The following is what I plan to do. >> >> The idea is to use an Org-mode heading for each book and the >> properties of the books become the ones of the Org-mode heading. The >> synopsis of the book can be in the body of the heading. > >I use Org to track my reading, but keep less information, so a simple table is >enough. In 2015 I wrote up how it looked: > >https://www.miskatonic.org/2015/01/01/reading-diary-in-org/ > >The basic annual reading list is still the same, but I'm doing a lot more with >the data now, using R to generate charts and other analysis. > >Your plan looks very much like something I saw on Planet Emacslife¹ a week or >two ago ... but now I can't find it because it scrolled off the bottom. Maybe >someone else here saw it? Or is the one who wrote it? It was someone using >properties to store information about the books and then using a column view >to display all the information in a table. > >Could you fit everything into a table? That's simpler than using properties. >But if you need lots of bibliographic detail, I guess that's the best solution >in Org. > >If you were willing to look outside Org then I'd recommend Zotero,² which is >designed to keep track of all that; there are Emacs tools to talk to Zotero, >or you could dump a BibTeX file and use Org's citation system. If I were >doing what you want to do, I'd keep basic lists in tables in Org, keep notes >on books in structured headings grouped by subject and then chronological >order, and use Zotero for bibliographic management. > >Good luck! Whatever you get started with, it'll be easy to refine and adapt >in a month or six depending on what you need. > >Bill > >¹ https://planet.emacslife.com/ >² https://www.zotero.org/ > >-- >William Denton >https://www.miskatonic.org/ >Librarian, artist and licensed private investigator. >Toronto, Canada
Re: I can't set dabbrev to respect the writen case
did you confirm that fancy-dabbrev is not setting a dabbrev setting? On 5/16/22, Samuel Wales wrote: > by default hippie-expand cycles. to cycle backward you can undo. idk > if it or dabbrev has a menu. > > idk if this is useful but there is at least one menu package and many > completion packages at seemingly varying levels of interoperability. > some things have menus built in. there is some degree of modularity > in some packages, especially a set of minibuffer completion packages, > which is not waht you are looking for. i am confused by the many > options. so what i would start with is as an ignoramus [that's me] is > trying to find an overview of what's out there, dabbrev settings or a > hook for a menu, he settings, whether anything with a menu incluing a > menu package is intended to fit modularly into dabbrev, whether > dabbrev or he fit into some framework [company?] that has or can use a > menu. possibly you already tried those things but in cas nobod > anwers. > > > On 5/16/22, Ypo wrote: >> Thanks, Samuel >> >> I've uninstalled fancy-dabbrev, and it seems to work when I complete >> using M-/. But, now I don't have candidates to choose the completion. >> Any advice with this? >> >> Best regards, >> Ypo >> >> El 16/05/2022 a las 0:15, Samuel Wales escribió: >>> i do not use fancy-dabbrev, but i use dabbrev in hippie-expand. it >>> seems to do as you want. >>> >>> it should be possible to run hippie-expand with just dabbrev. it >>> might not be exactly the same because he might have its own version of >>> dabbrev. which might be what you want in this case. >>> >>> note that you have control over where dabbrev gets its data. idk if >>> that is a feature of vanilla dabbrev. >>> >>> i do not use any dabbrev settings or any he settings except the main >>> one for he. it is set to >>> >>>'(try-expand-dabbrev-visible >>> try-expand-dabbrev >>> try-expand-dabbrev-all-buffers >>> try-expand-dabbrev-from-kill >>> >>> try-complete-lisp-symbol >>> ;;do i want this first? am i supposed to use another thing to >>> ;;complete from that point? >>> ;;try-complete-lisp-symbol-partially >>> >>> ;;try-expand-whole-kill >>> try-complete-file-name-partially >>> try-complete-file-name >>> hoka-try-complete-with-calc-result) >>> >>> >>> On 5/14/22, Ypo wrote: Hi I find dabbrev and fancy-dabbrev very useful to typing fast. But there is a problem I am not able to solve: When I apply an expansion while writing, the case is always that of the expansion, I can't make it to respect what I have written. An example: — (Typing) "Hel — (Offered expansion) "hello" — (What I get when accepting the expansion) "hello" — (What I wanted) "Hello" Best regards, Ypo >>> > > > -- > The Kafka Pandemic > > A blog about science, health, human rights, and misopathy: > https://thekafkapandemic.blogspot.com > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: I can't set dabbrev to respect the writen case
by default hippie-expand cycles. to cycle backward you can undo. idk if it or dabbrev has a menu. idk if this is useful but there is at least one menu package and many completion packages at seemingly varying levels of interoperability. some things have menus built in. there is some degree of modularity in some packages, especially a set of minibuffer completion packages, which is not waht you are looking for. i am confused by the many options. so what i would start with is as an ignoramus [that's me] is trying to find an overview of what's out there, dabbrev settings or a hook for a menu, he settings, whether anything with a menu incluing a menu package is intended to fit modularly into dabbrev, whether dabbrev or he fit into some framework [company?] that has or can use a menu. possibly you already tried those things but in cas nobod anwers. On 5/16/22, Ypo wrote: > Thanks, Samuel > > I've uninstalled fancy-dabbrev, and it seems to work when I complete > using M-/. But, now I don't have candidates to choose the completion. > Any advice with this? > > Best regards, > Ypo > > El 16/05/2022 a las 0:15, Samuel Wales escribió: >> i do not use fancy-dabbrev, but i use dabbrev in hippie-expand. it >> seems to do as you want. >> >> it should be possible to run hippie-expand with just dabbrev. it >> might not be exactly the same because he might have its own version of >> dabbrev. which might be what you want in this case. >> >> note that you have control over where dabbrev gets its data. idk if >> that is a feature of vanilla dabbrev. >> >> i do not use any dabbrev settings or any he settings except the main >> one for he. it is set to >> >>'(try-expand-dabbrev-visible >> try-expand-dabbrev >> try-expand-dabbrev-all-buffers >> try-expand-dabbrev-from-kill >> >> try-complete-lisp-symbol >> ;;do i want this first? am i supposed to use another thing to >> ;;complete from that point? >> ;;try-complete-lisp-symbol-partially >> >> ;;try-expand-whole-kill >> try-complete-file-name-partially >> try-complete-file-name >> hoka-try-complete-with-calc-result) >> >> >> On 5/14/22, Ypo wrote: >>> Hi >>> >>> I find dabbrev and fancy-dabbrev very useful to typing fast. But there >>> is a problem I am not able to solve: When I apply an expansion while >>> writing, the case is always that of the expansion, I can't make it to >>> respect what I have written. An example: >>> >>> — (Typing) "Hel >>> >>> — (Offered expansion) "hello" >>> >>> — (What I get when accepting the expansion) "hello" >>> >>> — (What I wanted) "Hello" >>> >>> >>> Best regards, >>> >>> Ypo >>> >> -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: Tips on using Org-mode to manage a reading list
On 16 May 2022, Sébastien Gendre wrote: My goals are to: * List books and articles I want to read * Track books I have to buy and which I already own * Track books and articles I have read * Take notes on books I have read The following is what I plan to do. The idea is to use an Org-mode heading for each book and the properties of the books become the ones of the Org-mode heading. The synopsis of the book can be in the body of the heading. I use Org to track my reading, but keep less information, so a simple table is enough. In 2015 I wrote up how it looked: https://www.miskatonic.org/2015/01/01/reading-diary-in-org/ The basic annual reading list is still the same, but I'm doing a lot more with the data now, using R to generate charts and other analysis. Your plan looks very much like something I saw on Planet Emacslife¹ a week or two ago ... but now I can't find it because it scrolled off the bottom. Maybe someone else here saw it? Or is the one who wrote it? It was someone using properties to store information about the books and then using a column view to display all the information in a table. Could you fit everything into a table? That's simpler than using properties. But if you need lots of bibliographic detail, I guess that's the best solution in Org. If you were willing to look outside Org then I'd recommend Zotero,² which is designed to keep track of all that; there are Emacs tools to talk to Zotero, or you could dump a BibTeX file and use Org's citation system. If I were doing what you want to do, I'd keep basic lists in tables in Org, keep notes on books in structured headings grouped by subject and then chronological order, and use Zotero for bibliographic management. Good luck! Whatever you get started with, it'll be easy to refine and adapt in a month or six depending on what you need. Bill ¹ https://planet.emacslife.com/ ² https://www.zotero.org/ -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. Toronto, Canada
Tips on using Org-mode to manage a reading list
Hello. I want to use Org-mode to manage a reading list and I'm looking for tips. My goals are to: * List books and articles I want to read * Track books I have to buy and which I already own * Track books and articles I have read * Take notes on books I have read The following is what I plan to do. The idea is to use an Org-mode heading for each book and the properties of the books become the ones of the Org-mode heading. The synopsis of the book can be in the body of the heading. Example: #+begin_example * TO-READ Four Futures - Life After Capitalism :PROPERTIES: :Title: Four Futures - Life After Capitalism :Author:Peter Frase :Score: :Publisher: Verso Books :Release_date: Unknown :Link: https://www.versobooks.com/books/1847-four-futures :Pages: :END: An exhilarating exploration into the utopias and dystopias that could develop from present society #+end_example I can then structure my Org-mode file like I want. Here, the first level headings are: * Articles * Books In the "Books" heading I have the headings "Non-fiction" and "Fiction". To track the status of the books, I set the following for the Org-mode file: * TO-GET * TO-READ * READING * READ (DONE state) For adding new books, I can use Org-capture with a custom template. The captured book can be saved inside an "Inbox" Org-mode file, then moved to its destination heading with Org-refile. For searching a book inside the file, I can use "Sparse Trees" or Org-ql. If I get the digital version of the book, I can attach it to its corresponding heading with Org-attach. And for taking notes, I can create headings inside the book heading. Using Emacs narrow to focus on it. If I get the digital version of the book, I can use Org-noter. End of description. Do you have any suggestions or idea ? I don't know how to manage books with several volumes. Do I create a heading for each volumes ? Do I create one heading for the whole collection ? The first is easy with 2 or 3 volumes, but not when I got 23 or more in a collection. Do you have idea to manage borrowing and loaning books ? Thank you in advance. :) Best regards
Tips on using Org-mode to manage a reading list
Hello. I want to use Org-mode to manage a reading list and I'm looking for tips. My goals are to: * List books and articles I want to read * Track books I have to buy and which I already own * Track books and articles I have read * Take notes on books I have read The following is what I plan to do. The idea is to use an Org-mode heading for each book and the properties of the books become the ones of the Org-mode heading. The synopsis of the book can be in the body of the heading. Example: #+begin_example * TO-READ Four Futures - Life After Capitalism :PROPERTIES: :Title: Four Futures - Life After Capitalism :Author:Peter Frase :Score: :Publisher: Verso Books :Release_date: Unknown :Link: https://www.versobooks.com/books/1847-four-futures :Pages: :END: An exhilarating exploration into the utopias and dystopias that could develop from present society #+end_example I can then structure my Org-mode file like I want. Here, the first level headings are: * Articles * Books In the "Books" heading I have the headings "Non-fiction" and "Fiction". To track the status of the books, I set the following for the Org-mode file: * TO-GET * TO-READ * READING * READ (DONE state) For adding new books, I can use Org-capture with a custom template. The captured book can be saved inside an "Inbox" Org-mode file, then moved to its destination heading with Org-refile. For searching a book inside the file, I can use "Sparse Trees" or Org-ql. If I get the digital version of the book, I can attach it to its corresponding heading with Org-attach. And for taking notes, I can create headings inside the book heading. Using Emacs narrow to focus on it. If I get the digital version of the book, I can use Org-noter. End of description. Do you have any suggestions or idea ? I don't know how to manage books with several volumes. Do I create a heading for each volumes ? Do I create one heading for the whole collection ? The first is easy with 2 or 3 volumes, but not when I got 23 or more in a collection. Do you have idea to manage borrowing and loaning books ? Thank you in advance. :) Best regards
Re: Bug in 9.5.3 org--file-default-apps
On 5/16/22 11:14 AM, Max Nikulin wrote: Sounds reasonable. However I just have tried a [[file:~/path/to/script]] link running Org main HEAD and the file is opened in emacs (26.3) other window. Hmmm. That's interesting. I upgraded from Emacs 26.x to 27.x at some point in the not-too-distant past. Maybe that explains it. I'm on ubuntu bionic, using emacs 27.1 from kelleyk emacs ppa.
Re: Bug in 9.5.3 org--file-default-apps
On 5/16/22 11:14 AM, Max Nikulin wrote: However I just have tried a [[file:~/path/to/script]] link running Org main HEAD and the file is opened in emacs (26.3) other window. Hmmm. That's interesting. I upgraded from Emacs 26.x to 27.x at some point in the not-too-distant past. Maybe that explains it.
Re: I can't set dabbrev to respect the writen case
Thanks, Samuel I've uninstalled fancy-dabbrev, and it seems to work when I complete using M-/. But, now I don't have candidates to choose the completion. Any advice with this? Best regards, Ypo El 16/05/2022 a las 0:15, Samuel Wales escribió: i do not use fancy-dabbrev, but i use dabbrev in hippie-expand. it seems to do as you want. it should be possible to run hippie-expand with just dabbrev. it might not be exactly the same because he might have its own version of dabbrev. which might be what you want in this case. note that you have control over where dabbrev gets its data. idk if that is a feature of vanilla dabbrev. i do not use any dabbrev settings or any he settings except the main one for he. it is set to '(try-expand-dabbrev-visible try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol ;;do i want this first? am i supposed to use another thing to ;;complete from that point? ;;try-complete-lisp-symbol-partially ;;try-expand-whole-kill try-complete-file-name-partially try-complete-file-name hoka-try-complete-with-calc-result) On 5/14/22, Ypo wrote: Hi I find dabbrev and fancy-dabbrev very useful to typing fast. But there is a problem I am not able to solve: When I apply an expansion while writing, the case is always that of the expansion, I can't make it to respect what I have written. An example: — (Typing) "Hel — (Offered expansion) "hello" — (What I get when accepting the expansion) "hello" — (What I wanted) "Hello" Best regards, Ypo
Re: [tip] Export and open a PDF in Android via Termux
Max Nikulin writes: > Does termux have a notion of mailcap, e.g. mime-support package or > something similar? I have a hope that > > application/pdf; termux-open %s > > in /etc/mailcap or in ~/.mailcap might be enough instead of explicit > configuration of particular packages. I've been playing with Termux for a short time and what you're suggesting hadn't occurred to me. Indeed, it works fine with a ~/.mailcap file! I have done a test with an attachment in Gnus: https://imgur.com/a/g1Auvxp Termux is quite interesting (and addictive :-)). Now I am playing with Termux-api to send notifications from Emacs/Gnus to Android (with gnus-desktop-notifier and the termux-notification command). And also to send sms from Emacs and bbdb... Best regards, Juan Manuel
Re: Bug in 9.5.3 org--file-default-apps
On 16/05/2022 18:57, Ihor Radchenko wrote: Craig STCR writes: But with the new form in 9.5.3, /home/user/myscript is opened by /bin/less, not emacs. I assume mailcap is not consulted. Which does not work well. These behaviors are only for org. Outside of org, emacs behaves correctly. mailcap does get consulted. What you are seeing happens because mailcap.el (built-in Emacs library) is only able to recognise mime-types by extension. So, your file is likely recognised as "nil" mimetype thus making Org mode fallback to default mailcap handler, which is /bin/less in your case. Sounds reasonable. However I just have tried a [[file:~/path/to/script]] link running Org main HEAD and the file is opened in emacs (26.3) other window. I guess that Org can also try to use `file' command (when available) to determine the mime type. Though ideally, it should be all handled by mailcap.el Would you mind writing to emacs-devel mailing list and asking to add the feature of using `file' command into mailcap.el? https://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01057.html Re: using libmagic in Emacs? From: joakim Subject:Re: using libmagic in Emacs? Date: Mon, 24 Aug 2009 14:30:33 +0200 A never committed patch. It is sour from my point of view. https://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01368.html From: Eli Zaretskii Subject:Re: using libmagic in Emacs? Date: Sun, 30 Aug 2009 06:09:23 +0300 From: Juri Linkov Date: Sun, 30 Aug 2009 02:19:12 +0300 I agree that running `file' is a simpler solution. PLEASE do not base Emacs infrastructure on external programs, unless they come with Emacs. `file' is not available on every platform, and even on those it is, the quality and extent of its database is unclear and so cannot be relied upon. https://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01072.html From: Richard Stallman How hard would it be to change the code in Emacs to recognize these using the existing mechanism?
Re: [tip] Export and open a PDF in Android via Termux
On 15/05/2022 18:54, Juan Manuel Macías wrote: (setq org-file-apps '((auto-mode . emacs) (directory . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . "termux-open %s"))) Does termux have a notion of mailcap, e.g. mime-support package or something similar? I have a hope that application/pdf; termux-open %s in /etc/mailcap or in ~/.mailcap might be enough instead of explicit configuration of particular packages.
Re: [BUG] org-babel-load-file can not compile file
On 14/05/2022 18:35, Ihor Radchenko wrote: Max Nikulin writes: Ihor, I am sorry for confusion, it still does not work for me. Likely I tried locally with `load-file' instead of `load'. The former additionally has `expand-file-name'. (Emacs-26.3) Should work now. Thank you, Ihor. I can confirm that my test example works now.
Re: Bug in 9.5.3 org--file-default-apps
[ With 'Reply All' ] Here's a summary of what I currently observe: 1) I was mistaken about the change from 9.5.2 to 9.5.3. You are correct. As you noted, the 9.5.2, 9.5.3 diff I previously mentioned was erroneous. 2) The problem I encounter with both 9.5.2 and 9.5.3 is that when opening a shell script -- no file extension, e.g. /home/user/myscript -- mailcap should be consulted and org should open the script file in Emacs. The mailcap entry is: application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY" But instead, org opens the script file using /bin/less, not emacs. 3) The misbehavior in #2 is new. I don't know exactly when it started misbehaving but I suspect it happened after updating org to 9.5.3. But other packages -- elpa, emacs binaries, OS binaries -- may have been updated at the same time, or before that, or after that, so hard to pin it down. I can't even say for sure if the upgrade to org 9.5.3 was from org 9.5.2. It may have been an upgrade from an org version older than 9.5.2. 4) Throughout this discussion, when I say "org opens" I am referring to the key sequence "C-c C-o" bound to org-open-at-point. It opens script file with /bin/less, which is not what I would expect. , bound to org-open-at-mouse (which calls org-open-file?) has the same misbehavior. 5) , bound to org-find-file-at-mouse, *works as expected* and opens the script file in emacs. Also, using a single prefix argument, "C-u C-c C-o" *works as expected* and opens the script file in emacs. 6) Last but not lease, when I *manually edit* org.el and change the last line of the org--file-default-apps function definition, removing underscore and space, and replacing with single quote like this: diff 8701c8700 < (_ org-file-apps-gnu))) --- > ('org-file-apps-gnu))) I no longer observe the misbehavior described in #2 and #4. Instead, org *works as expected*, like it does with #5, and opens the script file in emacs, not /bin/less. I know your time is valuable. No need for you to spend a lot of time on this if I am the only one having this problem. It could be some random artifact in my installation, maybe something in my ~/.emacs. My ~/.emacs has a lot in it. And I have a work-around, since I can use #5. Best wishes, -C On 5/16/22 6:29 AM, Craig STCR wrote: It's possible my elpa is FUBAR. I will uninstall, rm .elc, re-install, and re-compile org 9.5.3 when I get a chance. On 5/16/22 6:08 AM, Craig STCR wrote: OK, I'll take a look as you suggested as soon as I can. So the form in 9.5.2 was a bug? The problem I encounter with the new form in 9.5.3 is that when opening a shell script -- no file extension, e.g. /home/user/myscript -- 9.5.2 would consult mailcap and open the script in Emacs. The mailcap entry is: application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY" But with the new form in 9.5.3, /home/user/myscript is opened by /bin/less, not emacs. I assume mailcap is not consulted. Which does not work well. These behaviors are only for org. Outside of org, emacs behaves correctly. I'll take a look as you suggested as soon as I can. Thanks, Ihor. On 5/16/22 4:33 AM, Ihor Radchenko wrote: Craig STCR writes: 9.5.3 does not return org-file-apps-gnu because org-file-apps-gnu is not quoted. Should be (and was in 9.5.2): 'org-file-apps-gnu but in 9.5.3 it is: _ org-file-apps-gnu Please try to run the following form: (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) ('org-file-apps-gnu)) ;; => nil and then (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) (_ org-file-apps-gnu)) ;; => ((remote . emacs) (system . mailcap) (t . mailcap)) The second case is returning a list, which org--file-default-apps supposed to return. The previous behaviour was erroneous. You may refer to M-x describe-function pcase to understand the code. Please, provide more details on the actual error you ran into. The change in the org--file-default-apps is not a bug. Best, Ihor
Re: org-noter
Uwe Brauer writes: > Ok, so it is my setting, sigh. > > BTW does this mode set any sort of marker in the pdf? FYI, org-pdftools package allows to set links to specific coordinates in pdf files by creating annotations. Best, Ihor
Re: Bug in 9.5.3 org--file-default-apps
Craig STCR writes: > OK, I'll take a look as you suggested as soon as I can. > > So the form in 9.5.2 was a bug? Yes, 9.5.2 version of that function was a bug. > The problem I encounter with the new form in 9.5.3 is that when opening > a shell script -- no file extension, e.g. /home/user/myscript -- 9.5.2 > would consult mailcap and open the script in Emacs. The mailcap entry is: > > application/x-shellscript; emacs27 %s; test=test -n "$DISPLAY" > > But with the new form in 9.5.3, /home/user/myscript is opened by > /bin/less, not emacs. I assume mailcap is not consulted. Which does > not work well. These behaviors are only for org. Outside of org, emacs > behaves correctly. mailcap does get consulted. What you are seeing happens because mailcap.el (built-in Emacs library) is only able to recognise mime-types by extension. So, your file is likely recognised as "nil" mimetype thus making Org mode fallback to default mailcap handler, which is /bin/less in your case. In Org 9.5.2 the error in org--file-default-apps made Org mode skip using mailcap and use the last possible fallback, which is opening in emacs. That fallback just happened to be the same with your setting in mailcap file. I guess that Org can also try to use `file' command (when available) to determine the mime type. Though ideally, it should be all handled by mailcap.el Would you mind writing to emacs-devel mailing list and asking to add the feature of using `file' command into mailcap.el? Best, Ihor
Re: [tip] Export and open a PDF in Android via Termux
Juan Manuel Macías writes: > I have recently installed TeX live on Android inside Termux: > > $ pkg install texlive-installer > > (https://wiki.termux.com/wiki/TeX_Live) > > And I've managed to open a PDF exported from Org using an external > android viewer (mupdf, downloaded from f-droid). The Termux command is > termux-open. You need to add: > > (setq org-file-apps > '((auto-mode . emacs) > (directory . emacs) > ("\\.mm\\'" . default) > ("\\.x?html?\\'" . default) > ("\\.pdf\\'" . "termux-open %s"))) Thanks for sharing! I am wondering if tips like this should be added to worg. Best, Ihor
Re: org-noter
> Uwe Brauer writes: --- Snip -- > BTW does this mode set any sort of marker in the pdf? I have never seen any marker in the pdf file. Best wishes, Colin Baxter.
Re: Bug in 9.5.3 org--file-default-apps
Craig STCR writes: > 9.5.3 does not return org-file-apps-gnu because org-file-apps-gnu is not > quoted. Should be (and was in 9.5.2): > > 'org-file-apps-gnu > > but in 9.5.3 it is: > > _ org-file-apps-gnu Please try to run the following form: (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) ('org-file-apps-gnu)) ;; => nil and then (pcase 'gnu/linux (`darwin org-file-apps-macos) (`windows-nt org-file-apps-windowsnt) (_ org-file-apps-gnu)) ;; => ((remote . emacs) (system . mailcap) (t . mailcap)) The second case is returning a list, which org--file-default-apps supposed to return. The previous behaviour was erroneous. You may refer to M-x describe-function pcase to understand the code. Please, provide more details on the actual error you ran into. The change in the org--file-default-apps is not a bug. Best, Ihor
Re: [tip] Export and open a PDF in Android via Termux
Thank you for this. Very helpful. I use termux to take org notes on the move. I don't often have to create a PDF but it's nice to know how to do it and be able to view it. And, best of all, is the pointer to mu-pdf! -- : Eric S Fraga, with org release_9.5.3-504-gcdbb1c in Emacs 29.0.50